Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

Motif FAQ (Part 6 of 9)
Section - 157) How can I send an expose event to a Drawing Area widget? (or

( Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Counties ]


Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 156) TOPIC: DRAWING AREA WIDGET
Next Document: 158) How can I know when a DrawingArea has been resized? It
See reader questions & answers on this topic! - Help others by sharing your knowledge
any other, come to that). I want to send an expose event so that it will
redraw itself.
[Last modified: Nov 97]

Answer: Use the Xlib call

XClearArea(XtDisplay(w), XtWindow(w), 0, 0, 0, 0, True)

This clears the widget's window and generates an expose event in doing so.
The widgets expose action will then redraw it.  This uses a round trip
request.  An alternative, without the round trip is

from orca!mesa!rthomson@uunet.uu.net  (Rich Thomson):

Widget da;
XmDrawingAreaCallbackStruct da_struct;

da_struct.reason = XmCR_EXPOSE;
da_struct.event = (XEvent *) NULL;
da_struct.window = XtWindow(da);

XtCallCallbacks(da, XmNexposeCallback, (XtPointer) &da_struct);

Thanks to rand@ling.umu.se (Ola Andersson) for a correction to the above.


User Contributions:

Comment about this article, ask questions, or add new information about this topic:




Top Document: Motif FAQ (Part 6 of 9)
Previous Document: 156) TOPIC: DRAWING AREA WIDGET
Next Document: 158) How can I know when a DrawingArea has been resized? It

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
kenton@rahul.net (Ken Lee)





Last Update March 27 2014 @ 02:11 PM