UI Interest Group Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

LV2012 - NewProject "Listbox"?

Hello,

Can someone help me how to create such a listbox like in Labview 2012 - New Project Dialog panel? That control handles large icons on the left side and the text in every line has links.

Thank you so much!

Question.png

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 1 of 20
(13,161 Views)

First, I would start by checking if the source code is not in a packed library or password protected. You might be able to simply reuse it.

If that doesn't help, then one way you can do it (and I'm guessing this is what the code does) is to create a 1D array of clusters, where each element is a line. The cluster will have the following:

  1. A boolean or color box for the background.
  2. A picture control for the icon.
  3. A string for the name.
  4. A string for the category.
  5. A string for the description.

You make the controls disabled and use the mouse down event for the array to detect which element was clicked and change the color of the background.


___________________
Try to take over the world!
Message 2 of 20
(4,690 Views)

Another alternative (if the link behavior is important to you) is to have the element as a reentrant VI. You set up a bunch of subpanels, get references to them and then set them up one below the other dynamically and push the front panels into them. You can see an example of this type of UI here - http://forums.ni.com/t5/LabVIEW/An-experiment-in-creating-compositable-user-interfaces-for/m-p/12624...


___________________
Try to take over the world!
Message 3 of 20
(4,690 Views)

The listbox in that dialog is implemented using a picture control. Unfortunately, the VIs used for drawing and managing it are not part of a reusable library and it doesn't look like we have any plans to package it as such.


Christina Rogers
Principal Product Owner, LabVIEW R&D
Message 4 of 20
(4,690 Views)

Thank you so much for your help!

And another question. At the bottom of the dialog, the RSS field updates the entries by rolling up. Any idea of this behavior?

---
+++ In God we believe, in Trance we Trust +++
[Hungary]
0 Kudos
Message 5 of 20
(4,690 Views)

Too bad.  It's a really cool interface.

Wire Warrior

Behold the power of LabVIEW as my army of Roomba minions streaks across the floor!
Message 6 of 20
(4,690 Views)

Wire_Warrior wrote:

Too bad.  It's a really cool interface.

I agree.  It's a bit of a sad indictment on the LabVIEW UI functionality if a simple listbox can't use the built-in UI if it wants to look good - and that's with NI programming it themselves.  Surely it would have been a similar amount of effort to code a new control, and then the whole community could benefit from it.

One could make the same comments about the 2012 Getting Started window - are this all a picture control too, or are there unreleased controls that have been developed for it?  Perhaps that could be made available too.

Message 7 of 20
(4,690 Views)

You're talking about a tabular control that can composite arbitrary contents in each cell, which is a far cry from a simple listbox. Producing a specific instance of a control with fixed cell contents is a completely different ballpark than creating a generalized way of building and operating a tabular control with nested controls.

The Getting Started window is not a single picture control. The News ring is a picture control. The listboxes are normal listbox controls. The buttons have custom images, but there's nothing there that can't be done in the normal Control Editor.


Christina Rogers
Principal Product Owner, LabVIEW R&D
0 Kudos
Message 8 of 20
(4,690 Views)

Christina_R wrote:

The Getting Started window is not a single picture control. The News ring is a picture control. The listboxes are normal listbox controls. The buttons have custom images, but there's nothing there that can't be done in the normal Control Editor.

Including the scroll-bars?  That's one thing I've never been able to edit using the Control Editor.

0 Kudos
Message 9 of 20
(4,690 Views)

The listboxes are Silver style, which were added to the palette in LV2011. They have different scrollbars than the Modern and Classic controls. You can't edit scrollbars in the Control Editor. In fact, the Silver controls draw their scrollbars differently by virtue of having the Silver style frame cosmetic - so if you change out that image in the Control Editor they will lose that scrollbar.


Christina Rogers
Principal Product Owner, LabVIEW R&D
Message 10 of 20
(4,690 Views)