WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 06-08-2016, 09:50 AM
M@rcello M@rcello is offline
Member
 
Join Date: May 2016
Posts: 11
Question 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' ) 
In the menu i can set the color and size of the ball. I would like to have a button to confirm the properties and insert immediately a ball with that color and size.

Thanks in advance!
Reply With Quote
  #2  
Old 06-14-2016, 04:45 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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')
Reply With Quote
Reply

Tags
menu, vizard, vizdlg


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 08:20 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC