LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Cluster, Array, List or a mix of all? Some UI thoughts

Hi!

 

I'm working on a function of an application that will read and write parameters (101 for now, probably more later) to an EEPROM on a device the application controls.

The vi requests the current values stored, displays them, then the user can do changes, and upload all of them at once (not 1 by 1)

There would be 8 to 9 info to display per parameter:

[Name / ID / Changed value from EEPROM (maybe) / Value Hex / Value 2 Hex (redundancy) / Physical Value / Default Value / Unit / Description ]

The field "Changed Value" would help the user to see easily where changes where made.

 

Ultimately, some values would be grayed out and not changeable only after entering a password. This seems to be a real challenge if I still want to display them.

 

Basically, I'm struggling to find the proper container to display all of this info.

  • A Multibox list is interesting, but alone doesn't seem to be fitting:
    • Very easy to display data via multi-selection + a "search" function would be easy to implement 
    • Changing the field Value 1 shows to be difficult to collect in an event (or maybe I'm doing it wrong)
    • Conversion between string-hexadecimal value-Physical values will be a pain to manage/check between typos, decimal separator etc.
  • An array alone isn't possible (different datatype)
  • An array of cluster seems the best option right now, but still not ideal imo
  • I also thought of a mix between a List (for fixed info) and an array (for changeable values), but the UI doesn't looks very nice, it's difficult to align things properly and that could create issues and confusion depending on the screen resolution.

 

Srely someone else came accross the same interrogations and would have some ideas to share ? 🙂

 

Thanks,

Vinny.

 

0 Kudos
Message 1 of 18
(1,132 Views)

@VinnyAstro wrote:

Surely someone else came across the same interrogations and would have some ideas to share? 🙂


Yes, this happens...

 

There really isn't a good (nice UI, clean program, flexibility) solution at this moment.

 

There will be a grid control in some near future (LV23? 24?).

 

Some use a .NET grid control. Some made their own grid controls. There are a few online.

 

Another flexible way is to put enough controls in a cluster. Put the cluster in a class and make methods to manage how it looks. You don't need a class per se, but it's a nice container for doing stuff like this. On init, hide all controls, when adding a row, show, format and position the appropriate controls. A separate (outside the cluster) scrollbar could trigger a value change event and reposition the controls. At some point, controls that are outside the view have to be recycled for visible rows... It won't be easy, but if you're comfortable with control properties it's doable.

 

Another solution is to use a table control. But all elements are strings. Either filter events to force string formatting (into hex only), or overlay a control when the user clicks a cell, so s(he) actually clicks that control... Also not very easy.

 

Sometimes you can use a tree control, where each tree item can be clicked on and shows the item's values in another part of the front panel. This could be in a subpanel, but it doesn't have to.

0 Kudos
Message 2 of 18
(1,124 Views)

The easiest option is probably to have a MCLB for the display and do a double click on a row to open a VI with the details for that specific row, then close the VI to confirm the edit. This isn't as nice as editing directly in the control, but it can work.

 

Another option might be something along the lines of using subpanels and showing N copies of a VI, but you can't have an array of subpanels. It is possible to fake it convincingly and you can see a basic example here. With something like this you might have issues with the height (subpanels have borders, etc.), but that should be controllable through property nodes and you can probably overlap things if they don't visually interfere with each other.


___________________
Try to take over the world!
Message 3 of 18
(1,108 Views)

wiebe@CARYA wrote:

 

Another flexible way is to put enough controls in a cluster. Put the cluster in a class and make methods to manage how it looks. You don't need a class per se, but it's a nice container for doing stuff like this. On init, hide all controls, when adding a row, show, format and position the appropriate controls. A separate (outside the cluster) scrollbar could trigger a value change event and reposition the controls. At some point, controls that are outside the view have to be recycled for visible rows... It won't be easy, but if you're comfortable with control properties it's doable.

I'm comfortable with control properties, but not so much with classes...

If I had more time, I would give it a shot, but I guess that will be for version 2.0 when I'll figured all other issues aside first 🙂

 


wiebe@CARYA wrote:

Sometimes you can use a tree control, where each tree item can be clicked on and shows the item's values in another part of the front panel. This could be in a subpanel, but it doesn't have to.


That is actually an interesting idea. And without even having to use a subpanel, a simple indicator displaying a value stored either in a Map or an array could do.

But I would say that it would be a great solution if I didn't have to update all values at once. Loosing the overview of all the values that will be updated seems like a big deal to me, but I don't give up on that thought yet.

0 Kudos
Message 4 of 18
(1,099 Views)

@tst wrote:

The easiest option is probably to have a MCLB for the display and do a double click on a row to open a VI with the details for that specific row, then close the VI to confirm the edit. This isn't as nice as editing directly in the control, but it can work.

 


Yes, same issue than what wiebe@CARYA was suggesting. I like this idea in general (although I would keep it under one window only as this function will already be a pop-up window)

 


@tst wrote:

Another option might be something along the lines of using subpanels and showing N copies of a VI, but you can't have an array of subpanels. It is possible to fake it convincingly and you can see a basic example here. With something like this you might have issues with the height (subpanels have borders, etc.), but that should be controllable through property nodes and you can probably overlap things if they don't visually interfere with each other.


So I've done a test with a mix between a MCLB and an array of cluster (Value 1+ 2 +physical). For scrolling I'm just using the Top row property and the Index value and matching them in the event sctructure looking for "Mouse wheel" event for either objects.

I had to adapt the height of the cells but also the font size in my array of cluster. Because for a Font size of 20, there were no height that was exactly matching the space between 2 rows of the array.

It is a bit of tuning here and there, in the end it "works" but it's just inelegant, almost ugly, and I still have the issue of password protection for some values. (as far as I know, one can't disable specific indexes in an array.)

0 Kudos
Message 5 of 18
(1,093 Views)

@VinnyAstro wrote:

Hi!

 

I'm working on a function of an application that will read and write parameters (101 for now, probably more later) to an EEPROM on a device the application controls.

The vi requests the current values stored, displays them, then the user can do changes, and upload all of them at once (not 1 by 1)

There would be 8 to 9 info to display per parameter:

[Name / ID / Changed value from EEPROM (maybe) / Value Hex / Value 2 Hex (redundancy) / Physical Value / Default Value / Unit / Description ]

The field "Changed Value" would help the user to see easily where changes where made.

 

Ultimately, some values would be grayed out and not changeable only after entering a password. This seems to be a real challenge if I still want to display them.

 


I'd imagine an array of clusters with your mentioned data + hidden admin stuff, like 'bool Locked'. (Hmm, why should that be hidden ...?)

Either a Ring control to select which element to select, or a List box. 

You only show the selected (1) element, but in reality it's an array.

The lock of elements in an array needs a 'hack', but either use a MouseDown? event or simply have a Flat button filling the cluster, that's Transparant when unlocked. Or you set the Array to Disabled when you select a locked element. If you only show one item at a time it's easy enough.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 18
(1,076 Views)

@Yamaeda wrote:

 

I'd imagine an array of clusters with your mentioned data + hidden admin stuff, like 'bool Locked'. (Hmm, why should that be hidden ...?)

Either a Ring control to select which element to select, or a List box. 

You only show the selected (1) element, but in reality it's an array.

The lock of elements in an array needs a 'hack', but either use a MouseDown? event or simply have a Flat button filling the cluster, that's Transparant when unlocked. Or you set the Array to Disabled when you select a locked element. If you only show one item at a time it's easy enough.


If I show only one element at a time, either via a simple selection on the Listbox or a ringbox or any other selection element, then yes, it's very easy to either disable or not the control(s).

My problem is that it doesn't provide a proper overview for the user to make sure that all values are correct before committing to the upload on the EEPROM (which could be dangerous in case of bad values)

 

The transparent boolean that is visible or not is an interesting idea, but I've tried it and I couldn't find an easy way to make it visible only to the index I'm interested in, and mixing a mouse down event together with the mouse position and the actual array index sounds like a big headache to me.

 

After to fails and tries, I think I'll go with a MultiC listbox mixed with an array of cluster with 4 elements:

the three value controls together with a background colorbox. The controls are transparents, the array as well so that every row of the array can match the color of the list-box line.

If a specific parameter is password protected, I can gray out the whole line, and whenever the user tries to change its values, simple sends back the old value instead.

 

Here is an example of how it could look like, the whole table would display more rows of course.

VinnyAstro_2-1663865107137.png

 

 

The array of cluster is on top of the Multicolumn list box. I am matching the top row to the array index via events, and the color of the whole row will depend on the password protection or any changed value (when a value has been changed but not uploaded to the eeprom.)

There is a second listbox for the description as these can be very long, I wanted to have a horizontal line without affecting the display of the rest of the list.

 

0 Kudos
Message 7 of 18
(1,066 Views)

With a large number of data items, if they can be organized into a reasonable hierarchal structure, I generally prefer a tree control.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 8 of 18
(1,040 Views)

wiebe@CARYA wrote:

Some use a .NET grid control. Some made their own grid controls. There are a few online.


Like this one: 

unipsycho/LabVIEWdotNetDataGrid: A LabVIEW table replacement using dotNet DataGridView for simpler a...

 

Never used it...

0 Kudos
Message 9 of 18
(992 Views)

@tst wrote:

The easiest option is probably to have a MCLB for the display and do a double click on a row to open a VI with the details for that specific row, then close the VI to confirm the edit. This isn't as nice as editing directly in the control, but it can work.


Several times I've done something like this.  The data behind the scenes is an array of a type def'ed cluster.  Each row in the MCLB is an element of the cluster.  Then I allow the user to drag and drop to move, or copy rows, and that translates into moving or copying array elements.  If you double click the row the more detailed dialog can come up showing you more, and then that is going to become a bundle by name, with a replace array subset at the selected row.  I made a XControl many years ago that was intended on handling the different UI translations from native LabVIEW data type, to MCLB row, and then back, but there are just so many use cases that I couldn't get it polished enough to release it publicly.

Message 10 of 18
(976 Views)