#1
|
|||
|
|||
about setPosition
I'm trying to use vizinfo and textbox to establish a form. I wanna some textboxes arranged on the vizinfobox on certain positions. e.g. horizontallly, not vertically, ordered. This is hard because the setPosition attribute can only change the position of label of textbox and the position of the input field can't be changed in this way. Can any experts tell me whether I can do it in this way?
If yes, how can I do it? Regards |
#2
|
|||
|
|||
Quote:
Tbox = viz.add(viz.TEXTBOX, 'tb') Tbox.setPosition(.2,.2) |
#3
|
|||
|
|||
I would avoid using the vizinfo feature for detailed control over GUI elements.
Try manualy aranging the gui. Here is some sample code. Because the elements are under the viz.ORTHO parent, there positions are specified in pixels. Code:
guiRoot = viz.addGroup(parent=viz.ORTHO) viz.link(viz.CenterTop, guiRoot) buttonRoot = viz.addGroup(parent=guiRoot, pos=(0, -100, 0)) button = viz.addButton(parent=buttonRoot, pos=(200,0,0), scale=[1]*3) label = viz.addText('Toggle HUD', parent=button, pos=(-50,25,0), scale=[25]*3) button = viz.addButton(parent=buttonRoot, pos=(0,0,0), scale=[1]*3) label = viz.addText('Set Background', parent=button, pos=(-50,25,0), scale=[25]*3)
__________________
Paul Elliott WorldViz LLC |
|
|