Zunbeltz wrote:
···
On Tue, 29 Jun 2004, Robin Dunn wrote:
Zunbeltz wrote:
Hi,
I have a combox and a statictext. When i choose a item from the combox i
whant to change the statictextthe code is somethig like this:
self.Bind(wx.EVT_COMBOBOX,self.OnSelectNewUser,self.UserComboBox)
def OnSelectNewUser(self, event):
self.currentuser = self.UserComboBox.GetValue()
self.currentdir = ControlConf.get("user-"+self.currentuser,
"dir")
self.UserText.SetLabel("in "+self.currentdir)The problem is that after selecting the item, the statictext is not
updated until the combobox is presed again.
How can i do to change the text inmediately after the item is selected or
highlighted?Does it help to do self.UserText.Refresh()?
No. I've put this function in OnSelectNewUser, after
self.UserText.SetLabel("in "+self.currentdir). The problem is that the
label is refreshed when pushing the combobox again.I think the problem is with the combobox event. Is this event executed
when the selected item selected and the mouse button released?
When an item is selected, which should be when the mouse is released, or it is activated by the keyboard.
Which platform and version are you using? Can you reproduce the problem in a small stand-alone sample?
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!