Le 16/12/2014 04:00, Jussi Lahtinen a écrit :
>> I'm not clear enough: you should not have to disable and re-enabling a
>> control inside an event handler, because you are not supposed to call
>> event loop (WAIT instruction) inside an event handler. If you
>> don't call the event loop, then disab
> I'm not clear enough: you should not have to disable and re-enabling a
> control inside an event handler, because you are not supposed to call
> event loop (WAIT instruction) inside an event handler. If you
> don't call the event loop, then disabling then re-enabling is useless.
>
OK, now I und
Le 16/12/2014 03:29, Jussi Lahtinen a écrit :
>> But there is no need to disable the control, re-enabling it, then giving
>> it focus back. What for? Just disable it when enter is hit.
>>
>
> The code you see is only isolation for demonstration of the problem. There
> is really code (call of sub) b
This is what I mean:
TextBox1.Enabled = False 'Prevent user messing while showing the data.
ShowSomeData()
TextBox1.Enabled = True 'Enable user to give new input...
TextBox1.SetFocus() '...without need to click on the textbox.
Jussi
On Tue, Dec 16, 2014 at 4:29 AM, Jussi Lahtinen
wrote:
>
>
>
> But there is no need to disable the control, re-enabling it, then giving
> it focus back. What for? Just disable it when enter is hit.
>
The code you see is only isolation for demonstration of the problem. There
is really code (call of sub) between disabling and enabling the control.
It's not en
Le 14/12/2014 18:46, Jussi Lahtinen a écrit :
>>
>> Disabling a control, then re-enabling it, then giving it focus back
>> inside a keypress event is not a good idea.
>
>
> The keypress event waits for enter key as sign of end of user input.
> Then the idea is to disable user input while data is sh
>
> Disabling a control, then re-enabling it, then giving it focus back
> inside a keypress event is not a good idea.
The keypress event waits for enter key as sign of end of user input.
Then the idea is to disable user input while data is shown in other control.
This was first thing in my mind h
Le 14/12/2014 03:34, Jussi Lahtinen a écrit :
> Textbox's event is fired twice if the box is disabled, enabled and put in
> focus.
> See attachment.
>
> Everything work as expected with Qt4.
>
>
> Jussi
>
Not really. It behaves badly too with gb.qt4, but just less.
Disabling a control, then re-en
Textbox's event is fired twice if the box is disabled, enabled and put in
focus.
See attachment.
Everything work as expected with Qt4.
Jussi
GTKEventBug-0.0.1.tar.gz
Description: GNU Zip compressed data
--
Download BIR