Path: utzoo!attcan!uunet!husc6!cs.utexas.edu!ut-emx!juniper!dan From: dan@juniper.uucp (Dan Galewsky) Newsgroups: comp.windows.x Subject: Widget re-display Keywords: widgets, clock widget, set values Message-ID: <3472@juniper.uucp> Date: 4 Aug 88 18:16:36 GMT Organization: Austin UNIX Users' Group, Austin, TX Lines: 27 I have built a 'gauge' widget which is roughly based on the 'clock' widget. It has an internal timer which wakes up periodically and checks to see if the value of the gauge has changed. If it has, it erases the hand and redraws it at the new position for the current value. Clients of this widget change its value by setting an attribute of the gauge widget and may do so at a frequency different than the internal timing interval. When I run this widget as a simple widget as a direct child of the root widget it works fine and updates correctly without doing a redisplay except when it becomes un-obscured or when it changes size. When I try to use this widget as a child of a constraint widget, it gets an expose event every time the value is changed which causes my expose redisplay routine to execute and redisplay the whole widget. All I want to do is redraw the hands when the value has changed between internal wake-ups without having the whole widget redrawn . How can I keep the widget from having to redraw itself when the value changes? (note: when my SetValues routine is called with the new widget value it is correclty returning FALSE for the redisplay) Thanks Dan Galewsky galewsky%asc@sdr.slb.com