01-20-2021 04:25 PM
Hi All,
is it possible to produce this kind of control in LabVIEW (opt.: programmatically in runtime)?
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.
01-21-2021 01:54 AM
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
01-21-2021 05:13 AM
@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...
01-21-2021 09:02 AM
It would be a PITA, but you can
mcduff
01-22-2021 02:40 AM
@mcduff wrote:
It would be a PITA, but you can
- Use a Multicolumn Listbox, remove lines to make it look like a tree
- Add Secret option to allow symbols in all boxes
- Get mouse click in cells and change symbols appropriately, check box etc.
- 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.
01-22-2021 08:48 AM - edited 01-22-2021 09:30 AM
wiebe@CARYA wrote:
@mcduff wrote:
It would be a PITA, but you can
- Use a Multicolumn Listbox, remove lines to make it look like a tree
- Add Secret option to allow symbols in all boxes
- Get mouse click in cells and change symbols appropriately, check box etc.
- 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.
mcduff
EDIT:
The Example Finder is a Mutlicolumn ListBox with Multiple Symbols. Remove the horizontal lines, looks more "Tree" like.
01-22-2021 11:38 AM
@mcduff wrote:
wiebe@CARYA wrote:
@mcduff wrote:
It would be a PITA, but you can
- Use a Multicolumn Listbox, remove lines to make it look like a tree
- Add Secret option to allow symbols in all boxes
- Get mouse click in cells and change symbols appropriately, check box etc.
- 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.
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.