LabVIEW APIs Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Managing GUIs by scripting

I guess everybody agrees on 'LabVIEW allows you to develop a good GUI in a short time'. But making it perfectly the way you want it to operate often involves a lot of coding and some 'dirty' workarounds (like:placing some transparent decorations above parts you don't want to allow to edit).

One other shortcoming in my feeling is, that you have no built-in capability of accessing a certain set of properties of all GUI elements (let's say just to check if all buttons are set to latch when released).

As far as we need to generate code to get it working, scripting allows us some automatic generation abilities.

I start this discussion to share code and ideas with others and to adress the shortcomings of a GUI concept that is a bit 'aged'.

So one idea from my side: If you use Key Navigation, you're limited to a set of special keys. If you want to use some standard combinations like CTRL+V to invoke a copy operation, it is necessary to have an event structure monitoring for the key down events.

So my tool should allow me to select a VI and display all controls (not indicators) with key navigation, tabbing order (and ???), let it alter it and insert code on the event structure when needed. Takes some coding as there are several cases:

* No event structure (do we need to generate the while loop or place it in an existing one?)

* More than one event structure

* Key Down? (Filter-) or Key Down Event already exists (do they conform with our format of case structures to get all Mod-Keys?)

I guess you all have some issues we might finally adress.

Ok, keep it flowing.

Felix

0 Kudos
Message 1 of 4
(4,092 Views)

So  you can easily control with the help of short keys.

0 Kudos
Message 2 of 4
(2,856 Views)

A lot of what you want to see is already covered by the VI-analyzer.

But all of the changes are new.

I would also suggest not to bother with more than one eventstructure,  one is more than enough in a good program.

Otherwise you need to carefully check that no two events are both handled by the structures.

greetings from the Netherlands
0 Kudos
Message 3 of 4
(2,856 Views)

I don't see what the VI analyzer has to do with it (it don't have it so I only know the marketing web-casts). But the VI analyzer uses privat properties (and that is not scripting) to check the code for some style guidlines.

What I want to present (or others to present their own ideas) is to use a combination of properties for FP elements (which were public all the time) + scripting (generating code on the BD) to overcome the shortcomings of the GUI concept.

Among people that program GUI stuff, a hige variety of concepts are circulating, so I really want to adress cases that are using more than one event structure. I would say, that I even need to consider the case that the event handler is launched be vi server (common way at least in 7.1. LV to get code attached to controls, we didn't have XControls and I don't know if they can do all we can do by dynamic vit calls). The least should be a warning to the user, that the tool isn't working properly because it found more than one event structure (so where to place the code?).

Felix

0 Kudos
Message 4 of 4
(2,856 Views)