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? See reader questions & answers on this topic! - Help others by sharing your knowledge 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. User Contributions: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 March 27 2014 @ 02:12 PM
|
Comment about this article, ask questions, or add new information about this topic: