LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sliding Splitters for a fancy front end?

Solved!
Go to solution

Hello,

I have taken some inspiration from one of the Summer of LabVIEW webcasts and have been having a play around with things to make nice pretty front panels. (http://zone.ni.com/wv/app/doc/p/id/wv-3497)

 

I have taken to using a multicolumn list box to display an on screen log of errors, warnings, messages etc. I would like to hide this off the bottom of the screen (below a status bar) to enable an operator to call upon it when needed, and hide it to give more room for everything else when it isnt needed.

 

I have managed to get this working to an extent. I have got the list box to show and hide, but I am having a few troubles when re-sizing the window.

If the window is resized with the list box visible then the list box will resize with the window. However, due to the way I have hidden the list box it wont re-size when hidden, so reappear the right size when opened in a new size window.

 

I thought about programatically resizing the list box to fit the window width when the list box is called to show but didn't figure out how to do it. (something to do with VI server? can anyone help here)

Or is there a completely different method that you would recoment?

 

VIs attached, saved for LV2011 allong with a pdf which puts my above words into pictures.

Download All
0 Kudos
Message 1 of 7
(2,962 Views)

Just bumping this one back onto the front page as it has been buried overnight.

0 Kudos
Message 2 of 7
(2,928 Views)

Hi Phil,

 

Thank you for your post. I have replicated what you explained and see the issue you are having.

 

In your first post you mentioned "I thought about programatically resizing the list box to fit the window width when the list box is called to show but didn't figure out how to do it. (something to do with VI server? can anyone help here)"

 

Could you explain to me why this method hasn't worked so far? What is this something to do with VI server? This is how I would tackle the problem, using property nodes to resize the box to fit the window, so we just need to work out why this method hasn't worked so far and what we need to do to fix the issue.

 

Many thanks,

Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 3 of 7
(2,900 Views)

Thanks for the reply Eden.

 

Programatically resizing the box to fit the window hasnt worked so far because I have not figured out how to programatically resize the box!

 

I tried to do it using property nodes, but quickly realised that you cant use property nodes to change the size of things. Something in the back of my head says that I may be able to do this with LV Scipting (I think I was getting this confused with VI server earlier) but I am not sure how.

 

I wondered if this was a common problem with a standard solution before I started learning all about LV Scripting (assuming that is a potential solution)

0 Kudos
Message 4 of 7
(2,897 Views)
Solution
Accepted by topic author Phil_

Hi Phil,

 

Perhaps it's not what you are looking for, but you can programmatically set the size of objects (in Px) using property nodes. 

 

Right click on the Listbox and select "Create -> Property Node". From here scroll to the bottom where you should see "Size". You can select between Width, Height or All Elements.

 

Could the Width property node be a solution to your issue?

 

Best regards,

Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 5 of 7
(2,865 Views)

Thanks!

I had been side tracked by the 'Bounds' property and this KB article: http://digital.ni.com/public.nsf/allkb/C084C87C51976399862562FC00041D0A 

Not sure how I missed the 'Size' property!

 

0 Kudos
Message 6 of 7
(2,863 Views)

Hi Phil,

 

No worries. Thanks for drawing my attention to the KB - it is a little misleading and seems to suggest there's no other way to update sizes. I'll edit it today so it's a little clearer. Good luck with the application!

 

Best regards,

Eden S
Applications Engineer
National Instruments UK & Ireland
0 Kudos
Message 7 of 7
(2,856 Views)