asente@adobe.com (Paul Asente) (12/20/90)
When you change the background color of a widget, what happens is this: 1 The window background gets changed. 2 The window gets cleared. 3 (Eventually) These requests get sent to the server. 4 The server sends back an expose event for the window. 5 The widget repaints its contents over the new background color. By putting a sleep() after your changes, only steps 1 and 2 get done; the requests don't get sent to the server and the widgets don't get their expose events until after everything is done. Rather than using sleep, use Xt timer procedures: do the first thing you want to do, then register a timer procedure set to go off after a few seconds. This timer procedure does the next step and then registers another timer procedure to do the third step, and so forth. This allows the exposure processing to occur between events. -paul asente asente@adobe.com ...decwrl!adobe!asente