PDA

View Full Version : Custom Drop-Down Menus and Sliders


south_bank
05-17-2008, 04:43 PM
Hi,

I was wondering if it is possible to customise the entire elements of sliders and drop down menus in Vizard. For my project I require a custom drop down menu, of Red colour rather than blue, and a slider with a custom bar and selector, as I need to attach a texture of multiple colours to the slider bar and I need a yellow selector.

If it is possible it's probably really obvious, but I can't find it anywhere so any help would be much appreciated!

Thanks

farshizzo
05-19-2008, 02:38 PM
Sure, here is a script that shows how to customize the appearance of a drop-down menu and a slider:import viz
viz.go()

droplist = viz.addDropList(pos=(0.5,0.5,0))
droplist.addItems(['one','two','three'])

droplist.color(viz.RED,viz.DROPLIST_BORDER)
droplist.color(viz.BLUE,viz.DROPLIST_BACK)
droplist.color(viz.YELLOW,viz.DROPLIST_TEXT)
droplist.color(viz.PURPLE,viz.DROPLIST_BACK_SEL)
droplist.color(viz.WHITE,viz.DROPLIST_TEXT_SEL)


slider = viz.addSlider(pos=(0.5,0.1,0))

slider.barpicture('ball.jpg')
slider.tickpicture('gb_noise.jpg')

south_bank
05-20-2008, 04:27 AM
I knew it was something simple :o. Thanks a lot, again for the quick reply, it's really appreciated as I'm in the middle of my dissertation at the moment!