How to prevent UI updates interfering with user's actions?
Carsten A. Arnholm
arnholm at offline.no
Wed Jun 13 16:13:45 PDT 2007
Vadim Zeitlin wrote:
> On Wed, 13 Jun 2007 23:06:36 +0200 "Carsten A. Arnholm"
> <arnholm at offline.no> wrote:
>
>> In summary: How can I update the controls from within the program
>> without interfering with the user when he/she is updating something?
>
> If the problem only happens while the user is dragging the slider, you
> could try checking whether the mouse is currently captured.
> Unfortunately you probably need to use the native call for this as it's
> not captured at wx level if the native control does it.
>
> Alternatively, you could set some internal flag blocking the automatic
> updates after receiving EVT_COMMAND_SCROLL_THUMBTRACK and reset it
> when you
> get EVT_COMMAND_SCROLL_THUMBRELEASE.
>
> Of course, better still would be to avoid changing the controls the
> user is working with as IMHO it's quite a bad UI idea...
Thank you very much for replying, this was indeed helpful...!
On the first idea (native calls), it is not so attractive from my point of
view. After all it is a portable GUI :-) In any case it would require some
research on at least 2 platforms.
I have tried EVT_COMMAND_SCROLL_THUMBTRACK etc. now and using a blocking
flag.... that does in fact work :-) I think this is the best solution then.
Thanks for pointing me in that direction.
I agree that in general one should not update the controls the user is
working on (and we might allow such updates to be switched off). On the
other hand it will also be very confusing since the camera itself changes
its properties (as it does in auto exposure mode and on some other
occasions) without reflecting those changes in the GUI.
Regards
Carsten A. Arnholm
http://arnholm.org/
N59.776 E10.457
More information about the wx-users
mailing list