#1
|
|||
|
|||
Texbox deselecting
Hi All,
Im using a couple of textboxes in my code. The problem is that if you have one textbox selected you have to double click on another textbox/button to selected/press it. The first click deselecting the first textbox. The people in my office are finding it really anoying, is there anything that i can do to change this. I am putting in some sort of tab ordering, but they want to single click between textboxes and buttons. Any help would be good. Thanks |
#2
|
|||
|
|||
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) |
#3
|
|||
|
|||
Hi Jeff,
Ill try that first thing in the morning. Thanks |
#4
|
|||
|
|||
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 |
|
|