Path: utzoo!utgpu!watmath!clyde!att!rutgers!gatech!bloom-beacon!bu-cs!dartvax!ragged.dartmouth.edu!bent
From: bent@ragged.dartmouth.edu
Newsgroups: comp.windows.x
Subject: finding the initial size of a widget
Message-ID: <11313@dartvax.Dartmouth.EDU>
Date: 2 Dec 88 21:09:13 GMT
Sender: news@dartvax.Dartmouth.EDU
Reply-To: bent@ragged.dartmouth.edu ()
Organization: Dartmouth College
Lines: 18

I have a Label widget I'm using as a graphics canvas, and I'd like to
know its size (in order to scale the drawing appropriately).  I've
given it translations for  and  events.  It works
perfectly when you resize the application window from the window
manager.  However, I'd like to get a  event before the very
first  event the way raw Xlib programs do, and I can't figure
out how.  What should I do?

I've checked the Label's event mask at various times.  After creating it
with XtCreateManagedWidget (with the new translations in the arg list),
only the ExposureMask is on.  Not until after XtRealizeWidget(toplevel) is
the StructureNotifyMask on.

Nitty-gritty:  the Label is in a Form, which is in a VPaned in a Shell.
Environment is X11R3 with Athena Widgets and XToolkit on a Sun3/50.

Please reply directly  --  I'm not a news reader.
Thanks in advance,		- Sam Bent  ( bent@ragged.dartmouth.edu )