LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced user interface problem(s)

It would be great if we could have a page in the zone just for sharing advanced user interface solutions.

There are a number of shortcomings in LabVIEW when it comes to basic user interface functionality; some can be overcomes using third party tools like the G Toolbox or ActiveX controls, others can only partially be solved. I'm thinking about things like drag and drop, file association, child windows, minimizing to system tray, contexual pop-up menus, true color application icons, tree contol, tab control does not highlight name of selected tab etc etc...

Then you have less basic problems; say e.g. that you want to make a spreadsheet like interface where the user is to input numbers on some cells, text in others etc...and you want to indicate what type of input is required and immediately indicate false input...Using clusters is not very flexible neither when it comes run-time changes nor for control rescaling. Then you can use a text table and parse the inputs continously, but that will require lots of processing and if you e.g want a LED indicator in one cell you are limited to setting the color of a cell...

That is the kind of bigger interface problems I would love to see a dedicated web page for...you could have a "hall of fame" of the best solutions with the source code attached...

In this case my problem is quite similar to making an Explorer style directory listing...I need a resizable window showing a list of sensors with their status and measurement. If the window is so narrow that only one sensor can be listed per row the list should automatically become a single column with a scrollbar. If the window is enlarged beyond the space needed for showing the list as two columns the list should automatically resize to do just that.

The above problem can be solved using multiple multicolumn listboxes and have logic control visibility, how the list are filled...and to track what element the user has selected. Quite a bit of code necessary, and the result might still only partially emulate the scalability and behaviour of e.g. a directory list in explorer. However - perhaps someone has already made something like this, or can suggest a better solution?
Message 1 of 8
(3,923 Views)
Did you visit the LabVIEW zone Code sharing center? You can find some advanced solutions from other LabVIEW users there.
LabVIEW Zone
For the particular task you are trying to accomplish, you can try using the treeview control, which has Windows Explorer directory listing style. You will still have to use some logic to determine when the control bounds need to be enlarged. The Family Tree.vi is a LabVIEW shipping example that uses the treeview control.

Zvezdana S.
National Instruments
Message 2 of 8
(3,922 Views)
The explorer style indicator I tried to describe (not a tree control, I mentioned that) is one with the behaviour of the file list in explorer; each file is a single and double-clickable item in a list that dynamically aligns the objects in the list to fit the available area...Multicolumn listboxes, tables, multiple multicolumn listboxes etc...might be used to emulate this, but how to do it in an elegant way?

You can find quality articles in developer insights and the develpment libary on many general things (e.g. client-server designs) but not much about solutions to more complex user interface designs).
Message 3 of 8
(3,922 Views)
Hi,

Like you said, some funtionality can be solved... I dare to say that most
functionality can be done in LV.

Most of the things you mention are OS specific, and since LV is OS
independent, there are no functions provided for it. Also, some of the
things you mention, are not easy in any language.

+ drag and drop
There are some windows tricks to do this. There are examples. Look for the
OpenG toolkit.

+ file association
Can be changed in the windows explorer, the command line from an application
can be read to open with the selected file.

+ child windows
Normal child windows are standard. MDI are possible by using some windows
tricks. There are examples. Templates can be used to open several similar LV
windows.

+ minimizing to system tray
This is a windows thing, it can be done by calling the correct API's (just
like you have to do in every language).

+ contexual pop-up menus
I have a toolkit for this (for windows).

+ tree contol, tab control
Use ActiveX (just like you would do in every language)

+ Explorer style directory listing
You can use a ListVIEW ActiveX container to use this functionality.


+ true color application icons
+ does not highlight name of selected tab
+ dynamic creation of controls
These are indeed not very easy to do...


"Mads" wrote in message
news:506500000008000000A9750000-1042324653000@exchange.ni.com...
> It would be great if we could have a page in the zone just for sharing
> advanced user interface solutions.
>
> There are a number of shortcomings in LabVIEW when it comes to basic
> user interface functionality; some can be overcomes using third party
> tools like the G Toolbox or ActiveX controls, others can only
> partially be solved. I'm thinking about things like drag and drop,
> file association, child windows, minimizing to system tray, contexual
> pop-up menus, true color application icons, tree contol, tab control
> does not highlight name of selected tab etc etc...
>
> Then you have less basic problems; say e.g. that you want to make a
> spreadsheet like interface where the user is to input numbers on some
> cells, text in others etc...and you want to indicate what type of
> input is required and immediately indicate false input...Using
> clusters is not very flexible neither when it comes run-time changes
> nor for control rescaling. Then you can use a text table and parse the
> inputs continously, but that will require lots of processing and if
> you e.g want a LED indicator in one cell you are limited to setting
> the color of a cell...
>
> That is the kind of bigger interface problems I would love to see a
> dedicated web page for...you could have a "hall of fame" of the best
> solutions with the source code attached...
>
> In this case my problem is quite similar to making an Explorer style
> directory listing...I need a resizable window showing a list of
> sensors with their status and measurement. If the window is so narrow
> that only one sensor can be listed per row the list should
> automatically become a single column with a scrollbar. If the window
> is enlarged beyond the space needed for showing the list as two
> columns the list should automatically resize to do just that.
>
> The above problem can be solved using multiple multicolumn listboxes
> and have logic control visibility, how the list are filled...and to
> track what element the user has selected. Quite a bit of code
> necessary, and the result might still only partially emulate the
> scalability and behaviour of e.g. a directory list in explorer.
> However - perhaps someone has already made something like this, or can
> suggest a better solution?
Message 4 of 8
(3,921 Views)
I know...

But to comment your list of solutions;

Child windows can only partially be emulated due to the fact that the menus of VIs are not true menus...so if you e.g. maximize a child window it will cover the menu of the parent. I try to avoid all user interface behaviour that is not standard, so for this reason I have yet to use child windows in LV apps.

File associations need to work not just the first time you double-click on the file...which is the case for the command line solution. There is another one involving ActiveX that works, a bit inelegant, but the best available so far I think: http://cybertechs.qc.ca/~jpdrolet/labview

Dynamic creation of controls - some support for this is available in the G Toolkit.

The explorer style file list I
describe is something I have yet to see a good implementation of though.
Message 5 of 8
(3,921 Views)
 

 

Requirements    Price: $29.95

 

 Application Software:

LabVIEW 7.0+

 Toolkits Software:

 

 Additional Software:

 

 Language's:

LabVIEW


INVtray LabVIEW Toolkit allows the programmer to create a LabVIEW program that can be hidden from the task bar and accessed through the System Tray.  Comes with a sample VI that demonstrates all the features of the toolkit.
         
 
 
 

 
 
 
Message 6 of 8
(3,728 Views)
>+ contexual pop-up menus
>I have a toolkit for this (for windows).
 
Wiebe
 
You have a toolkit to create windows out of the system tray like the "updates are ready to be downloaded" given by windows?  Where can I get a copy of the toolkit?
 
Thanks
Message 7 of 8
(3,018 Views)
Did you notice that you are referring to a post that is over 5 years old? 😮 Many things have changed since then.
 
 
Message 8 of 8
(3,014 Views)