LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced tree control

Hi All, 

 

is it possible to produce this kind of control in LabVIEW (opt.: programmatically in runtime)?

AdvancedTreeControl_example.PNG

It should be a kind of an advanced tree control whose elements are not just strings but also Integers, floats, bools and ENUMs. In ideal case it should also contain other columns that will be showing min and max values, interactive controls (tick-boxes for Booleans, list-box selectors for ENUMs, sliders for numerical values, etc.).

 

(just a note: Attached image is a screenshot from NI MAX showing properties of the network camera. I want to reproduce a similar functionality in one of my LabVIEW projects aimed for GigE cameras control.)

 

Thanks for any advice. Simple solutions are better. Complicated ones are more funny. 😉

 

Cheers.

0 Kudos
Message 1 of 7
(1,890 Views)

The closest I am aware of is this : https://github.com/unipsycho/LabVIEWdotNetDataGrid

.NET based so Windons only, I played with it a bit but never used it in a real life project.

 

It's available via VIPM : https://www.vipm.io/package/mike_king_lib_labview_datagridview/


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 2 of 7
(1,846 Views)

@PunkyMoon wrote:

Thanks for any advice. Simple solutions are better. Complicated ones are more funny. 😉


Funny? It's sad really 😔.

 

You can draw anything in a picture control.

You can get images of controls to draw in a picture control.

You can see where the mouse is and overlay the real control over the image.

You could put everything in a sub panel (as you don't have much control over the picture control's scrollbars (like, getting events).

Then make your own scrollbars, and put them at the right spot.

Then, spend a week or two for making the tree hierarchy.

Also, make it all work together.

 

I've done something similar as a grid control. So the tree part is missing. Also, can't really share the code ATM. I can share that this takes a vast amount of time.

 

If you're interested, I can share more war stories. They'd probably (should) scare you.

 

You might be able to combine a regular tree with a picture control, used as above. You'll lose tree problems, and gain sync problems...

0 Kudos
Message 3 of 7
(1,840 Views)

It would be a PITA, but you can

  1. Use a Multicolumn Listbox, remove lines to make it look like a tree
  2. Add Secret option to allow symbols in all boxes
  3. Get mouse click in cells and change symbols appropriately, check box etc.
  4. Get mouse click to overlay a text ring control when needed. (Text Ring can be changed at runtime)

mcduff

0 Kudos
Message 4 of 7
(1,830 Views)

@mcduff wrote:

It would be a PITA, but you can

  1. Use a Multicolumn Listbox, remove lines to make it look like a tree
  2. Add Secret option to allow symbols in all boxes
  3. Get mouse click in cells and change symbols appropriately, check box etc.
  4. Get mouse click to overlay a text ring control when needed. (Text Ring can be changed at runtime)

mcduff


Would that look like a tree? I think it would look like a MCLB with symbols in all boxes.

 

The text in the tree and all the symbols overlap in horizontal position, and with the fixed grid of a MCLB that won't be possible. A somewhat similar effect seems the best outcome to me.

 

If you have a image (or code) of that, I'd be interested.

0 Kudos
Message 5 of 7
(1,812 Views)

wiebe@CARYA wrote:

@mcduff wrote:

It would be a PITA, but you can

  1. Use a Multicolumn Listbox, remove lines to make it look like a tree
  2. Add Secret option to allow symbols in all boxes
  3. Get mouse click in cells and change symbols appropriately, check box etc.
  4. Get mouse click to overlay a text ring control when needed. (Text Ring can be changed at runtime)

mcduff


Would that look like a tree? I think it would look like a MCLB with symbols in all boxes.

 

The text in the tree and all the symbols overlap in horizontal position, and with the fixed grid of a MCLB that won't be possible. A somewhat similar effect seems the best outcome to me.

 

If you have a image (or code) of that, I'd be interested.


Working at home I don't have the original code with me. Not sure if I still have, I abandoned that effort soon after the start.

 

This thread, https://forums.ni.com/t5/LabVIEW/Multicolumn-Listbox-scroll-bar-woes/td-p/3984278?profile.language=e... , has pictures of what I was trying to accomplish.  You can judge for yourself whether it looked like a Tree or not. (Scroll through the whole thread to see multiple pictures)

 

I never implemented (4) for the control, but I often use that method for Tables. The user clicks a box, and a text ring overlays the box with specific choices. See below.

 

Snap53.png

 

mcduff

 

EDIT:

 

The Example Finder is a Mutlicolumn ListBox with Multiple Symbols. Remove the horizontal lines, looks more "Tree" like.

 

0 Kudos
Message 6 of 7
(1,800 Views)

@mcduff wrote:

wiebe@CARYA wrote:

@mcduff wrote:

It would be a PITA, but you can

  1. Use a Multicolumn Listbox, remove lines to make it look like a tree
  2. Add Secret option to allow symbols in all boxes
  3. Get mouse click in cells and change symbols appropriately, check box etc.
  4. Get mouse click to overlay a text ring control when needed. (Text Ring can be changed at runtime)

mcduff


Would that look like a tree? I think it would look like a MCLB with symbols in all boxes.

 

The text in the tree and all the symbols overlap in horizontal position, and with the fixed grid of a MCLB that won't be possible. A somewhat similar effect seems the best outcome to me.

 

If you have a image (or code) of that, I'd be interested.


Working at home I don't have the original code with me. Not sure if I still have, I abandoned that effort soon after the start.

 

This thread, https://forums.ni.com/t5/LabVIEW/Multicolumn-Listbox-scroll-bar-woes/td-p/3984278?profile.language=e... , has pictures of what I was trying to accomplish.  You can judge for yourself whether it looked like a Tree or not. (Scroll through the whole thread to see multiple pictures)

 

I never implemented (4) for the control, but I often use that method for Tables. The user clicks a box, and a text ring overlays the box with specific choices. See below.

 

Snap53.png

 

mcduff

 

EDIT:

 

The Example Finder is a Mutlicolumn ListBox with Multiple Symbols. Remove the horizontal lines, looks more "Tree" like.

 


That's more of a compromise that a step towards a tree control.

 

Of course, perfectly ok to change your UI so it's actually possible in LabVIEW. 

0 Kudos
Message 7 of 7
(1,786 Views)