From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resizing XControl

i have various graphs and digital indicators which want to wrap inside one Xcontrol and add some custom features to the Xcontrol.
i am facing some problems in resizing the X control.
while resizing i have some specific requirements as follows
   1. the graphs should get aligned with the plot area and not with bounding decorations (because if my scale values are of different order then plot is no longer aligned)
    2. i should be able to change the order in which graphs and indicators are placed.
 
i have successfully written a VI which can perform all these. but if i put same(similar) functionality inside Facade VI then it doesnt work. i am attaching both the examples here can anybody help me out

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

Download All
0 Kudos
Message 1 of 16
(3,902 Views)

Tushar:

I looked through both zip files that you sent and I am still not sure about how you want the control to behave. When I change the size of any of the graphs and run the 'ResizeTest.vi", I can see that all the graphs are resized, is this the behavior you were describing?. I am not sure about what you mean by changing the order in which the graphs are placed. Please provide me with more information.

Regards,

Rudi N.

 

0 Kudos
Message 2 of 16
(3,880 Views)
yes in both the codes graphs are resizing
but if you see in VI model code the graphs are resing in such a way to fit it properly to winow size
 
for X control model create a new blank VI place the provided Xcontrol on the front panel and try to resize it. what i want is that when i resize this X Control all the graphs should resize in such a way that theyfit properly in X Control size.
 
as far as graph order is concerned
          you can see that for resize control subVI there is array of reference input called graph refs. if we change the order of refs coming to this terminal the order in which graphs are placed on front panel does get changed.
         there will be additional properties to the XControl which will change this order.
 
the only concern right now is that when i place this X control on the new VI Front panel it does not get resized properly as per the size of X control Instance on front panel
please let me know if any thing is still unclear or needs further clarifications

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 3 of 16
(3,871 Views)
may be this snap shot will be more useful to understand things

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 4 of 16
(3,868 Views)

Tushar:

Sorry for the late reply. I was looking through your code further and realized that you created an event for the XControl, but it operates on the pane of the facade VI of the XControl. The event does not operate on the top level VI. I believe that it is the reason why resizing the graph on the XControls does not do anything. Let me know if you came across something else.

Thanks,

Rudi N.

0 Kudos
Message 5 of 16
(3,835 Views)
i have tried that already
as you are saying logically i should take the container size (which is made available inside Xcontrol). but i wasnt getting proper results. then i tried to resize as per facade VI size (Note: what is shown in Xcontrol is the same as Facade VI, also 3rd comment on Front panel of Facade VI "If the XControl is of fixed size,  make the
 window not resizable from VI Properties->Window Appearance." hints us that VI panel size might be the thing we should use)
i also tried to use the combination of Container size as well as VI panel size but i am not yet successful
 
thanks

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 6 of 16
(3,825 Views)

Tushar:

I have been playing with dynamically registering an event so that, from the facade.vi, we can monitor when the front panel of the top level VI changes (This can be achieved using VI Server to get a reference to the panel size of this top level VI). I have ran into some snags with that. I figured that I would share this with you to see what you can come up with on your end as well.

Thanks,

Rudi N.

0 Kudos
Message 7 of 16
(3,805 Views)
Hi Rudi
 
The problem is cracked now. things works fine if we use the size and orgin properties of the front panels pane object.
 
i really appreciate the patient efforts and long duration support from you.
Thank you, thank you very much
Also getting the events of parent VIs in facade VIs can help me to do some good things.

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 8 of 16
(3,794 Views)

Tushar:

I am pleased to know that things are now working fine. If I understand correctly, you changed the event case in the XControl to monitor size and origin properties?. Please let me know what else you changed or post the revised version of your code.

Thanks,

Rudi N.

0 Kudos
Message 9 of 16
(3,783 Views)
tommorow i will upload the code. so that you can review it.
 
thanks once again

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 10 of 16
(3,774 Views)