LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is their a way to create a dialog combo box control.

Hi
 
I recently discovered the point with the dialog controls, being that their appearance can change according to platform specific settings. I like the soft and smooth look and feel of the dialog controls as they appear in my LabVIEW version (7.1) and want to use these controls in all my applications dialogs. I've attached the look of the dialogs on my OS as an image.
 
What I need to use though is a combo box control, but this control does not seem to have a 'dialog control' counterpart. I need to use combo boxes in my dialogs, because I want the user to be able to enter undefined values (text) in a pull down list. This doesn't seem to be possible with a ring control - anyway not in a way that makes the user enter an undefined string in the ring control. Instead an '<other>' item at the end of the ring control's pull down list enables the user to add an undefined numeric value in a digital display (which I don't want to be visible in my UI).
 
I've worked around this problem with one of the dialog ring controls that I'm using, simply by putting an invisible string control on top og the ring control, and then making a lot of code in the event handler behind the user interface to syncronize the value of the string control with the ring control and vica versa. It's a difficult and tiresome process - especially if I have to do this for all of my pull down lists - and it could be implemented without much effort with a combo box control instead.
 
Is there a way for me  to 'create' a dialog combo box control that looks and behaves like a dialog control (that is has the appearance and behaviour of the dialog ring control), but actually is a combo box control.
 
As I don't necessarily want the controls to behave platform dependently (changing appearance according to OS), but rather want the controls to always look like the dialog controls on my OS, I was thinking about making a custom control, but I wouldn't know how to customize the look of standard controls to their dialog control counterparts.
 
Anyone has a solution to these problems?
 
Regards
 
Kim Stenbo
 
0 Kudos
Message 1 of 7
(3,542 Views)

It is actually fairly easy - customize the dialog control, switch to Edit mode and copy the image of the control.
Then, create a new control, place a combobox in it and switch to edit mode.
Replace the arrow image with the image in the clipboard and resize it to be the same size.
A few more tweaks (move to front, make sure things are the right size) and you're done.


___________________
Try to take over the world!
0 Kudos
Message 2 of 7
(3,528 Views)
Thanks!
 
I never really did figure out how to work with the custom controls. I don't think its all that straight forward, but with your explanation I think i finally managed to find out how the customization with all those frames and stuff works. Anyway I improved the appearence a bit, so it now totally looks like the original image (no lowered box frame and the pull down button is not separated from the text box).
 
Take a look if you like (otherwise other members in same situation might like to see it...).
 
Best regards
 
Kim Stenbo
0 Kudos
Message 3 of 7
(3,516 Views)

Nice...

It's interesting. On my computer, the combobox has my dialog graphics and not yours.
Is this because you used my example or because LV has some special way of going around the fact that we're copying images (I assume the former)?

If you figured out how control editing works, I'm impressed. Some controls, when edited, start moving the bounds of certain elements of the control and don't allow you to play with it. That part I haven't figured out.

BTW, XP's paint has an option to save images as PNG, GIF or JPG, each of which is much much smaller than BMP.


___________________
Try to take over the world!
0 Kudos
Message 4 of 7
(3,510 Views)
I copied the image from the dialog ring ctrl. myself and customized a new standard combo box ctrl, so I'm not sure whether XP has a way of working around the colors. The colors on the BMP of my dialog ctrls are exactly the same as when I view them in LV.
 
Kim Stenbo.
0 Kudos
Message 5 of 7
(3,503 Views)

This is what your control looks like in my computer, which is the way my dialog controls look (I use the classic look on XP). I would think that if you copied the image from your computer (the blue one), I would see the same one. I guess there is some deeper darker stuff going on.


___________________
Try to take over the world!
0 Kudos
Message 6 of 7
(3,493 Views)

Oh - I thought you were only talking about the color of the control.

So I guess, in fact if I insisted on having controls appearing like the dialog controls (in disregard to what the native PC settings are) I wouldn't even be able to do so, by making my own customized controls using the images from the dialig controls. Its so weird...! But hey on the upside is the fact, that I actually created a combo box dialog control, that works exactly like the rest of the LV's dialog controls.

Kim Stenbo

0 Kudos
Message 7 of 7
(3,485 Views)