Next: Using DrawingAreas in Practice Up: The DrawingArea Widget Previous: Creating a DrawingArea Widget

DrawingArea Resources and Callbacks

A DrawingArea will usually be placed inside an container widget - a Form, a MainWindow, etc. and is frequently scrolled.

As such it usually inherits size and other resources from its parent widget.

You can set resources like XmNwidth and XmNheight for the DrawingArea.

The XmNresizePolicy may need to be set to allow changes in dimension in a program. Possible values are: XmRESIZE_ANY, XmRESIZE_GROW and XmRESIZE_NONE.

Three callbacks are associated with this widget:

- This callback occurs when part of the window needs to be redrawn.
- If the dimensions of the window get changed this is called.
- if input in the form of a mouse button or key press/release occurs this callback is invoked.
Tue May 24 16:52:56 BST 1994