|
#1
|
|||
|
|||
Drop Down menu
Hello to everyone,
I am trying to build a drop down menu in vizard. This is the code: HTML Code:
import viz import vizdlg viz.go() #Create main menu object import vizmenu menu = vizmenu.add() #Align the menu in the enter of the top of the screen. menu.setAlignment( vizmenu.CENTER ) #Add two pop-downs menus within the main menu. AppearanceMenu = menu.add( 'Appearance' ) Ball1Menu = menu.add( 'Ball 1' ) #Add a droplist to one of the pop-downs. themeDropDown = AppearanceMenu.add( viz.DROPLIST, 'Theme' ) themeDropDown.addItems( ['Default','Dark','Green'] ) #Add sub-menu under the Ball1 menu and put radio buttons in it. Ball1ColorMenu = Ball1Menu.add( vizmenu.MENU, 'Color' ) Ball1Red = Ball1ColorMenu.add( viz.RADIO, 0, 'Red' ) Ball1White = Ball1ColorMenu.add( viz.RADIO, 0, 'White' ) Ball1Blue = Ball1ColorMenu.add( viz.RADIO, 0, 'Blue' ) #Add another sub-menu to the Ball1 menu for a slider. Ball1SizeSlider = Ball1Menu.add( viz.SLIDER, 'Size' ) Thanks in advance! |
#2
|
|||
|
|||
You could add a button or button label:
Code:
button = Ball1Menu.add(viz.BUTTON,'Submit') button.setScale([2]*3) buttonLabel = Ball1Menu.add(viz.BUTTON_LABEL,'Submit') |
Tags |
menu, vizard, vizdlg |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Regarding creation of a 3D Models Menu | rajnishv | Vizard | 4 | 03-11-2016 05:05 AM |
visibility of a menu | clowenth | Vizard | 1 | 08-05-2010 07:36 PM |
vizmenu tweak | hosier | Vizard | 0 | 06-29-2009 11:10 AM |
Changing menu header text | hosier | Vizard | 2 | 06-23-2009 01:45 PM |
Creating a loop to switch between menu pages | RodRSpv | Vizard | 1 | 03-02-2009 03:19 PM |