WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-19-2008, 09:41 PM
xingxing xingxing is offline
Member
 
Join Date: Feb 2008
Location: Sydney
Posts: 9
Send a message via MSN to xingxing
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
Reply With Quote
  #2  
Old 02-20-2008, 02:01 AM
xingxing xingxing is offline
Member
 
Join Date: Feb 2008
Location: Sydney
Posts: 9
Send a message via MSN to xingxing
Quote:
Originally Posted by xingxing View Post
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
the format I used is like the following.

Tbox = viz.add(viz.TEXTBOX, 'tb')
Tbox.setPosition(.2,.2)
Reply With Quote
  #3  
Old 02-20-2008, 10:32 AM
Gladsomebeast Gladsomebeast is offline
Member
 
Join Date: Mar 2005
Location: Isla Vizta, CA
Posts: 397
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
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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


All times are GMT -7. The time now is 07:03 AM.


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