You could register a timeout handler with Xt, with a timeout of 1 second.
Then inside it you could re-install the timeout handler, and tell the widget
to show the next pixmap.
Between the invocations of the timeout handler, the event loop is active,
it will make sure your pixmap gets displayed. Installing the timeout handler
again every time is necessary, see the Xt docs.
Danny
[EMAIL PROTECTED] on 10/24/2000 01:04:00 AM
To: [EMAIL PROTECTED]@Internet
cc: [EMAIL PROTECTED]@Internet (bcc: Danny Backx/U27113/KB/KredAlm)
Subject: Re: a question
Programming problem. You don't understand how X, specifically Xt, works. It is
event driven, nothing happens outside of XtAppMainLoop.
On 23-Oct-00 at 18:46, hector duque ([EMAIL PROTECTED]) wrote:
> hi there,
>
> I am getting a situation as follow:
>
> 1) My lesstif application create a push button widget.
> 2) Then, a call back procedure is activated. This CB has a loop which
> put a pixmap into de button by each time in the loop (N times).
> Something like:
>
> for (i=0; i<N; i++){
>
> XpmCreatePixmapFromData( ....)
>
> other ....
>
> XtVaSetValues(DISPLAYbutton,
> XmNlabelType, XmPIXMAP,
> XmNlabelPixmap, pixmapP,
> NULL);
> .
> }
>
>
>
> the problem: I only got the last update on the button; I mean, I
> expected to see N pixmaps into the button, in secuence, one after the
> last one, but not, I only see the last one.
>
> well, I got the same problem when I use a label instead of a push
> button. It looks like a refresh issue or a programming problem ...
>
> any suggestions ?
>
> best regards in advance!
>
> hector
>
>
>