LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

about change the size of the panel and centerlize the window

Solved!
Go to solution

Hi there,

  I have a simple subvi, it has a string indicator embeded into the panel. I have the string fit to the pane. I am going to change the size of the panel to width 240 and height 24 then centerlize the panel. I found some code in the forum. If I don't put the string there, the code works perfect. But after putting the string, it will run into error.

 

a.png

 

And I call the subvi FP.vi in a main vi (main.vi).  The error is

------------------------------------------------------------------------------------------------------------------------------------------------------------------

Error 1 occurred at Property Node (arg 1) in FP.vi->main

 

Possible reasons(s):

LabVIEW:  An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.

Property Name: Front Panel Window:Panel Bounds

 

------------------------------------------------------------------------------------------------------------------------------------------------------------------

Any suggestion why this error?

0 Kudos
Message 1 of 10
(3,538 Views)
Solution
Accepted by topic author PKIM

I don't see a reference to the FP subVI in your image.  You need to have a VI reference going into the FP.PanelBounds Property Node.

0 Kudos
Message 2 of 10
(3,530 Views)

@lh845 wrote:

I don't see a reference to the FP subVI in your image.  You need to have a VI reference going into the FP.PanelBounds Property Node.


Left unwired the property node uses "This VI" as a default value.

 

 !1.png

That works OK

 

Do you have a minimum size set in the vi properties?


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 10
(3,524 Views)

Yes, I thought he was trying to call a subVI reference, though.

Anyway, I played around with the same VI's and I get the same error message if I try to use the same coordinates, but when I increased the bottom coordinate to a value of 26 then I don't get the error.  

0 Kudos
Message 4 of 10
(3,517 Views)

Here is a snippet that worked for me.

 

.FP Open.png

Message 5 of 10
(3,515 Views)

@lh845 wrote:

Here is a snippet that worked for me.

 

.FP Open.png


Yes there is a minimum height for string indicators you violated that


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 10
(3,509 Views)

@lh845 wrote:

I don't see a reference to the FP subVI in your image.  You need to have a VI reference going into the FP.PanelBounds Property Node.


I put everything in the subvi and I call the subvi in other code. I wonder if that subvi refer to itself automatically

0 Kudos
Message 7 of 10
(3,492 Views)

@PKIM wrote:

@lh845 wrote:

I don't see a reference to the FP subVI in your image.  You need to have a VI reference going into the FP.PanelBounds Property Node.


I put everything in the subvi and I call the subvi in other code. I wonder if that subvi refer to itself automatically


I just test that without the "This VI" it doesn't work. Thanks for your pointing out.

0 Kudos
Message 8 of 10
(3,483 Views)

@lh845 wrote:

Yes, I thought he was trying to call a subVI reference, though.

Anyway, I played around with the same VI's and I get the same error message if I try to use the same coordinates, but when I increased the bottom coordinate to a value of 26 then I don't get the error.  


Thanks for pointing that out. I just want to know how to figure out 26 is the minimum coordinate I should use other tha something else. Instead of hardcoding that, anywhere I can refer to so to get the minimum? Thanks.

0 Kudos
Message 9 of 10
(3,481 Views)

Min size is a property of many controls.  it changes.  for instance, with a silver style string control its 37 pixels high with the default font size. ( it Makes sense, that it shows 1 line of text clearly)  

 

By scaling to pane- the string min size is forced into the min pane size of the 1 pane panel (FP) so setting the height lower than the control could show 1 line of text clearly yielded an error. 

 

Or, in other words, the error explaination could have been clearer when it was first implemented.


"Should be" isn't "Is" -Jay
0 Kudos
Message 10 of 10
(3,476 Views)