LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XControl Rescaling

Hi,

 

I am using an XControl and I would like to change its size when the size of the pane it is on changes. Its property node "Bounds" is read-only, so there is no way of rescaling that way.

 

I read somewhere that rescaling could be achieved through the facade VI. I added the event case "Pane" (as you can see below) however the event is not fired when I run a VI containing the XControl - I think it is not the pane the XControl is placed on which referes to this event case.

 

How could I achieve rescaling of the XControl?

 

Best

volfi

 

0 Kudos
Message 1 of 2
(2,010 Views)

You don't need to adjust the pane (it's size is set outside the XControl code).  You need to adjust the sizes/positions of the objects on the FP of the facade VI.

Here are 3 possible ways to handle it:

  1. VI Properties -> Window Size -> Scale all objects on front panel as the window resizes.  This works OK for some facades, but in many cases it's not good enough.
  2. Capture the Pane Size event and use the NewBnds, OldBnds data to calculate new sizes/positions for the objects on the FP of the facade.  Set the sizes/positions of those objects, don't try to readjust the pane size.
  3. Divide up your facade's FP with splitters and set the splitter properties to get the rescaling behavior that you want.
"If you weren't supposed to push it, it wouldn't be a button."
Message 2 of 2
(1,948 Views)