LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

custom drop list

Hello,
Is it possible to make the drop down list have a seperator between two words that appears seamless. I problaby can use picture controls but this will require an immense amount of work. I have an attached vi that illustrates the problem.
 
Thanks in advance
 
Chris Co
0 Kudos
Message 1 of 10
(3,752 Views)
ooppss, forgot the attachment
0 Kudos
Message 2 of 10
(3,747 Views)
I'm not near a computer with LV at the moment, but if I understand what you want to do correctly, try adding an item with the value '-' (a hyphen). This should become a seperator.

___________________
Try to take over the world!
0 Kudos
Message 3 of 10
(3,737 Views)
Chris,

I did some sloppy modifying to your VI, but I think you can clean it up and use it if you want to go through the trouble.

So, I used a multicolumn listbox to replace the standard drop down and an event structure to handle the interaction.  There's still some work to be done to get the column widths like you want them, but left that up to you.

This might be a good candidate to use for an X Control.  One thing this code doesn't do is hide the listbox if you click somewhere else.  Depending on what else you've got going on in this GUI, that be an issue, as you're goign to have to find mouse clicks to hide the listbox.  You also lose the drop shadow on the standard ring drop down.
0 Kudos
Message 4 of 10
(3,728 Views)

Matt,

That is a very good idea. I hadn't thought of a table, I even have a table column width sizer already.  Mouse enter and move events will let me get the shadow effect. Thank you much for the workaround. About the active X control, I have never used or created so I dunno- can u have an entire parallel loop as an active X control?  If that is the case then it would be simple to track mouse down events that are not in the table range and abort the loops execution. let me know what u think.

 

Chris Co

0 Kudos
Message 5 of 10
(3,720 Views)

Tst,

I was trying just that. But the issue is when I want to line the hashes up exactly with different and assorted string inputs (numeric/text) and have it work no matter what font or size.

 

Chris Co

0 Kudos
Message 6 of 10
(3,718 Views)
Just a minor clarification, what MK suggested was an XControl, not an active X control.

Message Edited by S G on 10-02-2007 02:00 PM

S G
Certified LabVIEW Architect, Certified TestStand Architect, Certified Professional Instructor
0 Kudos
Message 7 of 10
(3,713 Views)

Matthew could you save it for 8.2? i'm interrested in the implementation 🙂

 

 

-----------------------------------------------------------------------------------------------------
... And here's where I keep assorted lengths of wires...
0 Kudos
Message 8 of 10
(3,699 Views)
Message 9 of 10
(3,693 Views)
As S G pointed out, NI has introduced X Controls.  Don't confuse them with ActiveX controls, although they are kind of LV's version of an ActiveX control.

The reason I used a listbox and not a table was to get the value change event.  If you use a table you will have to determine what value the user clicked.

I didn't really look into how to track the click outside of the control, so whatever you can determine to realize the click occurred and it was for that control will work just fine.
0 Kudos
Message 10 of 10
(3,689 Views)