sol@laura-palmer.lucid.com (Sonia Lyris) (04/04/91)
I'm using Motif 1.1 on a sun4. I'm having trouble getting a
XmPushButton widget to resize when I set the labelString to a
string of multiple lines of text. The widget has been created
but not yet mapped when I do the following:
{
char* mystring = "one\ntwo\nthree\nfour";
XmString xmstr;
xmstr = XmStringCreateLtoR (mystring, XmSTRING_DEFAULT_CHARSET);
ac = 0;
XtSetArg(al[ac], XmNlabelString, xmstr); ac++;
XtSetValues(widget, al, ac);
}
When the widget is mapped, it has about enough height for a
single line of text. I've checked the defaults; XmNrecomputeSize
is TRUE, and XmNlabelType is XmSTRING.
References, comments, and suggestions appreciated, even if the
solution is obvious. Thank you.
Sonia Lyris | Lucid, Inc, Menlo Park CA
sol@lucid.com | 415/329-8400x5559
sol@laura-palmer.lucid.com (Sonia Lyris) (04/04/91)
I figured out my problem shortly after I posted the question. I had the attachment definitions in the containing XmForm set to constrain the PushButton widget so there wasn't room for it to resize itself to properly contain the multiline label I'd given. Sonia Lyris | Lucid, Inc, Menlo Park CA sol@lucid.com | 415/329-8400x5559