comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » no focus on a widget
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
no focus on a widget [message #66024] Tue, 14 April 2009 11:36 Go to next message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
Hi all,

I have a program that, depending on the data, opens a widget and
requires user action, or simply opens the widget, triggers a timer
event, which, among other, closes the widget. This is repeated several
times, like 30 times in a second.

This is working well, but when every widget is closed by the timer
event, it creates a unpleasing flickering as the Workbench (or whatever
application I have running), constantly get and loose the focus. Is it
possible to realize a widget without giving it the focus?

In case someone is tempted by the fix "don't use the timer, don't use
the widget", I can't really... it would be too much work for just an
cosmetic problem, as most required functions used widget_control et al.

Thanks in advance if you have any idea!

Ah, one more thing, the program should run under windows and linux.. I
haven't checked yet if this effect also happens on linux.

Jean
Re: no focus on a widget [message #66161 is a reply to message #66024] Wed, 15 April 2009 07:31 Go to previous message
Jean H. is currently offline  Jean H.
Messages: 472
Registered: July 2006
Senior Member
> Jean,
>
> If you know in advance (i.e. before you draw it) you're not going to use
> the widget can you just set map=0 to the base of the widget when you
> create it?
>
> This should (untested!) still allow your timer events and various
> widget_controls to work without having to re-factor any code but will
> stop it appearing on the screen.
>
> Thanks,
>
> Allan
>

Thanks for the tip Allan! I missed the map=0 keyword in my investigations...

Doing this does 2/3 of the job.. 1) the widget is not shown, 2) if I run
another application than IDL, I don't see any flickering (i.e. the
application keep the focus), but, strange enough, IDL still gets and
loose the focus (not if IDL is iconised)!!! It is very strange since no
window is created... anyways, thanks a lot, as what I needed is met!

Jean
Re: no focus on a widget [message #66162 is a reply to message #66024] Wed, 15 April 2009 06:26 Go to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
Jean H. wrote:
> Hi all,
>
> I have a program that, depending on the data, opens a widget and
> requires user action, or simply opens the widget, triggers a timer
> event, which, among other, closes the widget. This is repeated several
> times, like 30 times in a second.
>
> This is working well, but when every widget is closed by the timer
> event, it creates a unpleasing flickering as the Workbench (or whatever
> application I have running), constantly get and loose the focus. Is it
> possible to realize a widget without giving it the focus?
>
> In case someone is tempted by the fix "don't use the timer, don't use
> the widget", I can't really... it would be too much work for just an
> cosmetic problem, as most required functions used widget_control et al.
>
> Thanks in advance if you have any idea!
>
> Ah, one more thing, the program should run under windows and linux.. I
> haven't checked yet if this effect also happens on linux.
>
> Jean

Jean,

If you know in advance (i.e. before you draw it) you're not going to use
the widget can you just set map=0 to the base of the widget when you
create it?

This should (untested!) still allow your timer events and various
widget_controls to work without having to re-factor any code but will
stop it appearing on the screen.

Thanks,

Allan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: i found some bugs with the idlffdxf object
Next Topic: Italic and upright in the same title/caption

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:44:51 PDT 2025

Total time taken to generate the page: 0.00599 seconds