![]() |
|
|
|
#1
|
|||
|
|||
|
Vizconfig panels support text boxes that filter for float or int values. Would this work for you?
Code:
'''
Press F12 to toggle the visibility
of the configuration window
'''
import viz
import vizconfig
import vizinfo
viz.setMultiSample(4)
viz.fov(60)
viz.go()
vizinfo.InfoPanel()
gallery = viz.add('gallery.osgb')
value = 25.0
def getValue():
return value
def setValue(v):
value=v
#Create a configurable object
bc= vizconfig.BasicConfigurable('Enter a float value between (-50,50)')
bc.addFloatItem('float value',range=(-50,50),fset=setValue,fget=getValue)
#register the object so it will display in the configuration window
vizconfig.register(bc)
|
|
#2
|
|||
|
|||
|
Hi Jeff,
thank you for pointing me to vizconfig. It seems that I can put that to good use, though I'll have to rework my menu system... My opinion is to prohibit unwanted user input rather than telling the user afterwards that I didn't like his input - meaning, I'd prefer that you can't enter letters or non-number special characters into a number (int, float) textbox at all. what about that TickerDialog and Panels, though...?Best Regards, Walter
__________________
21 is only half the truth. |
|
#3
|
|||
|
|||
|
P.S.
On the vizconfig basics help page (with the local beta-3 as well as the online version Vizard5 Online Help) some methods are omitted:
And another question, why are the additional examples and the screenshot now missing which were available in Vizard4 Online Help? Especially the screenshot gives a good idea what to expect, without having to run an example script. Best Regards, Walter
__________________
21 is only half the truth. |
|
#4
|
|||
|
|||
|
P.P.S:
there seems to be an error in an error message; when you supply only one positional argument to addBoolLabelItem, the error reads:TypeError: addBoolLabelItem() takes at least 1 argument (2 given) which should most likely be the other way round (at least 2 arguments and just 1 given) and I suggest to add documentation strings to the BasicConfigurable.add* resources, to ease scripting (I use that tooltip feature in the IDE quite a lot). Pleeeeease...
__________________
21 is only half the truth. |
![]() |
| Tags |
| gridpanel, menu, panel, tabpanel, tickerdialog |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| artoolkit no webcam showing | vrmdl | Vizard | 3 | 03-10-2014 12:01 PM |
| Showing another program in a virtual world | Frank Verberne | Vizard | 3 | 01-16-2013 11:26 AM |
| Models showing up | Elizabeth S | Vizard | 9 | 09-06-2006 07:11 PM |
| V8 HMD showing snow pattern | bailenson | Vizard | 3 | 06-22-2006 11:00 AM |
| running scripts without the IDE showing | hotspur1 | Vizard | 7 | 10-30-2003 11:36 AM |