[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 157) How do I determine the name of an existing widget?
Next Document: 159) Where can I get documentation on Xaw, the Athena widget set?
-
Search the FAQ Archives
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 157) How do I determine the name of an existing widget?
Next Document: 159) Where can I get documentation on Xaw, the Athena widget set?
158) Why do I get a BadDrawable error drawing to XtWindow(widget)?
I'm doing this in order to get a window into which I can do Xlib graphics
within my Xt-based program:
> canvas = XtCreateManagedWidget ( ...,widgetClass,...) /* drawing area */
> ...
> window = XtWindow(canvas); /* get the window associated with the widget */
> ...
> XDrawLine (...,window,...); /* produces error */
The window associated with the widget is created as a part of the
realization of the widget. Using a window id of None ("no window") could
create the error that you describe. It is necessary to call XtRealizeWidget()
before attempting to use the window associated with a widget.
Note that the window will be created after the XtRealizeWidget() call,
but that the server may not have actually mapped it yet, so you should also
wait for an Expose event on the window before drawing into it.
Top Document: comp.windows.x Frequently Asked Questions (FAQ) 7/7
Previous Document: 157) How do I determine the name of an existing widget?
Next Document: 159) Where can I get documentation on Xaw, the Athena widget set?
Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Single Page
[ Usenet FAQs | Web FAQs | Documents | RFC Index ]
Send corrections/additions to the FAQ Maintainer:
faq%craft@uunet.uu.net (X FAQ maintenance address)
Last Update October 22 2009 @ 05:36 AM