Disable/Enable inhibits further clicks on same button
Marco Cavallini
koansoftware at gmail.com
Sun May 11 12:07:59 PDT 2008
Using wxGTK-2.8.6, I need to avoid repeated clicks on a button during
some operation execution, and possibly to disable widgets in a window
during operations, so I used Disable() - Enable() (see code below).
Unfortunately I stopped dealing with a strange problem, because after
Disable() - Enable() all repeated clicks on the same button don't work.
I have to click on another part of the window or on another button
before being able to click to the same button again.
So I wonder if this is known behaviour or a possible bug.
In any case I would be grateful if someone could give me a hint about
what could be a valid workaround.
TIA
EVT_BUTTON( ID_BITMAPBUTTON1, DlgTest::OnBitmapbutton1Click )
...
void DlgTest::OnBitmapbutton1Click( wxCommandEvent& event )
{
Disable() ;
m_txtctrl->AppendText("do something\n");
Enable() ;
event.Skip();
}
--
/marco
More information about the wx-users
mailing list