ITEM: G1438L

How do I find the size of a Widget in Motif?




Question:

How do I find the size of a RowColumn manager which is resized based on 
its contents?

Response:

I created a bulletinboard manager.  Inside the bulletinboard I created a 
row column manager.  Inside the row column manager I created 4 pushbuttons.

For the callback of the pushbutton I put the following code to retrieve the
size of the row column manager.

        Dimension i;
        XtVaGetValues(XtParent(wgt), XmNwidth, &i, NULL);
        printf("Value of i is %d\\n", i);

No matter how I set the row column resources of:
        XmNwidth,
        XmNheight,
        XmNwidth,
        XmNpacking,
        XmNorientation,
        XmNnumColumns

The value of i was the correct width for the row column manager.  Please note
that the adjusted size of the RowColumn manager is only available AFTER the
rowColumn manager has been realized.  If it is not realized, the rowColumn manager
width and height will return as the value of the width and height set by
the application and not the size adjusted to by the rowColumn manager.


Support Line: How do I find the size of a Widget in Motif? ITEM: G1438L
Dated: February 1994 Category: N/A
This HTML file was generated 99/06/24~13:30:50
Comments or suggestions? Contact us