[comp.windows.x] Help: How can I force widget redraw without returning to XtMainLoop

umerin@mse.kyutech.ac.jp (Masanobu UMEDA) (12/01/90)

I want a label widget to redraw its string value without returning to
XtMainLoop.  How can I do it?

Any help would be appreciated.

Masanobu UMEDA
umerin@mse.kyutech.ac.jp
--
Masanobu UMEDA
umerin@mse.kyutech.ac.jp

etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) (12/04/90)

In article <UMERIN.90Dec1212240@purple.mse.kyutech.ac.jp>, umerin@mse.kyutech.ac.jp (Masanobu UMEDA) writes:
|> I want a label widget to redraw its string value without returning to
|> XtMainLoop.  How can I do it?
|> 
|> Any help would be appreciated.
|> 
|> Masanobu UMEDA
|> umerin@mse.kyutech.ac.jp
|> --
|> Masanobu UMEDA
|> umerin@mse.kyutech.ac.jp

#include Normal Xt includes
#include <IntrinsicP.h>
#include <CoreP.h>

	ExposeEvent event ;
	event->x = 0 ;
	event->y = 0 ;
	event->width = label->core.width ;
	event->height = label->core.height ;
	label->core.widget_class->core_class.expose(label,&event) ;
	XFlush(XtDisplay(label)) ;

I have never tried this, but It should work.
--
					Eric Taylor
					Baylor College of Medicine
					etaylor@wilkins.bcm.tmc.edu
					(713) 798-3776

dex@hpcvlx.cv.hp.com (Dex Smith) (12/04/90)

If you are using Motif, you can simply call XmUpdateDisplay() whenever you
want to update your application's window(s).  The XmUpdateDisplay() function
takes a single parameter:  a widget ID.

 - Dex Smith
   Hewlett-Packard Company