11-12-2012 07:50 AM
Hi all,
Here's a take on how to use XControls, sub-panels and LVOOP for simplified gui handling using subpanels with VI ref's.
The block diagram becomes quite tidy if all the gritty sub-panek & FP details are handled by the XControl:
And the front panel (sub panel) looks like this:
It is slightly similar to the action engines for example found in:
http://forums.ni.com/t5/LabVIEW/Community-Nugget-GUI-Components-using-Sub-Panels/td-p/1707270
A more extensive example(s) of this idea can be found at:
https://decibel.ni.com/content/docs/DOC-25242
https://decibel.ni.com/content/docs/DOC-25243
https://decibel.ni.com/content/docs/DOC-24602 (older queued api)
If you find it useful and can give some inspiration, feel free to comment.
However, the XControls on the PIDRegulator:gui.vi is a bit arcane and I haven't gotten round to improve them, don't flame too hard on those. 🙂
Attached is an example for LV2011.
Regards,
/Roger
11-12-2012 09:14 AM
Without having yet looked at the code, Kudos for sharing.
I've been exloring this avenue a lot recently (If my assumptions are correct) and I think it's an extremely powerful and tidy yet extendable way of doing things.
I look forward to looking at the code eventually when I get time.
Shane.
11-12-2012 10:59 AM
@Intaris wrote:
Without having yet looked at the code, Kudos for sharing.
I've been exloring this avenue a lot recently (If my assumptions are correct) and I think it's an extremely powerful and tidy yet extendable way of doing things.
I look forward to looking at the code eventually when I get time.
Shane.
Thanks Shane,
Yes, I am hoping it will help sort out some of the LV GUI annoyances, specially with LVOOP. I was also considering some fancier GUI stuff with sub-panels for header, footers, borders and such, but I gave it up.
What made me stop was wondering if LV is best GUI solution. Perhaps a better idea would be to go towards some other text based XAML/QML UI framework if it's an elaborate undertaking.
Br,
/Roger
11-12-2012 12:21 PM
Thank you Roger! That example certainly does offload a lot of functionality to the heavy lifters behind the scenes. (So much so that it took a while for me to figure out what it did)
Kudos and don't forget to unregister your events!
11-12-2012 01:58 PM
@JÞB wrote:
Thank you Roger! That example certainly does offload a lot of functionality to the heavy lifters behind the scenes. (So much so that it took a while for me to figure out what it did)
Kudos and don't forget to unregister your events!
You are welcome, thanks for the comments!
Fixed the unregistering. Bummer..
Br,
/Roger