Drop Down Menu Custom Graphics

MTC84 Member Posts: 33 Member


Is it possible to change the background colour of a Drop Down Menu? I tried commands like below but had no luck. I simply want to change the colour to a light grey with black text.



I saw a post that stated to use ui_button commands to skin the menu but nothing about changing colours without using a skin.

Thanks for any help.


  • corbo-billy
    corbo-billy Member Posts: 82 Helper

    The ideal would be to upload an image of your choice for this Menu with the code: $CONTROL_PAR_PICTURE _

    And for the color of the text, you have the choice between 25 fonts via the code: $CONTROL_PAR_FONT_TYPE

  • Gablux
    Gablux Member Posts: 61 Member

    For best results this is what you should do: Do not use a ui_menu at all.

    Yes, use 1 button for the menu opener and a custom graphic for this button + custom font and change the button text in the script depending on the menu choice below.

    When the button is pressed, you then show a label (menu background) and a number of buttons, that will be the entries in your menu. If you need, you can use a slider on the side of the menu background as a scrollbar.

    You will need extra logic to handle the scrollbar and the fixed amount of buttons text changing and also how your script will react to these buttons.

    This is the way to create a fully custom menu. There are even more advanced things you can do, but very few people know how and/or do it, considering the amount of work it is.

  • MTC84
    MTC84 Member Posts: 33 Member

    Thanks for the answers. Really helpful stuff.

    As it stands, I have already coded a drop down menu with previous and next buttons. The sample name is displayed in the drop down menu so that works fine for this instrument. I will likely go with the simple option of using $CONTROL_PAR_PICTURE + $CONTROL_PAR_FONT_TYPE. I did try this quickly the other day so I'm all good there.

    I did wonder how developers were making such customized menus for their instruments. Your answers cleared that up. I'll have to do some testing of the scrollbar version to understand it fully. I know how to display labels when selecting from a menu (hidden from view) which also uses previous and next buttons but the scrollbar style is beyond me. It's a shame the manual doesn't cover some of these interesting things and there aren't more developer tutorials from NI.


Back To Top