![]() |
|
|
|
#1
|
|||
|
|||
|
When a textbox loses focus you could check to see if the mouse is over another textbox and make it active:
Code:
import viz
import vizdlg
viz.go()
panel = vizdlg.Panel(align=vizdlg.ALIGN_CENTER)
panel.addItem(viz.addText('Textbox1'))
textbox1 = panel.addItem(viz.addTextbox())
panel.addItem(viz.addText('Textbox2'))
textbox2 = panel.addItem(viz.addTextbox())
viz.link(viz.CenterCenter,panel)
def updateFocus():
object = viz.pick(0,viz.SCREEN)
if object == textbox1:
textbox1.setFocus(viz.ON)
elif object == textbox2:
textbox2.setFocus(viz.ON)
vizact.onbuttonup(textbox1,updateFocus)
vizact.onbuttonup(textbox2,updateFocus)
|
|
#2
|
|||
|
|||
|
Hi Jeff,
Ill try that first thing in the morning. Thanks |
|
#3
|
|||
|
|||
|
textbox deselecting and radiobuttons
I'm creating a GUI and I had the same problem. Your approach worked quite well for the textboxes, but what do I have to do with radiobuttons after the textboxes?
Between the textboxes and the buttons is an invisible radiobutton, so none of them is selected. Could you give me a hint how to solve that case? Couldn't find a workaround yet.. ![]() Thanks, Rachel |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|