[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

225.0. "Resizing LABELs" by ULTRA::WRAY (John Wray) Thu Feb 16 1989 10:18

    How do I make a label widget/gadget resize itself automatically when I
    change the text of its label?  I've tried manually setting its
    CONFORM_TO_TEXT argument (even though this is supposed to default to
    true), tried both widget and gadget variants, even tried putting in a
    call to XT$RESIZE_WINDOW, but the label stays the size that it was
    created with.  Its parent is a DIALOG_BOX. 
    
    On a (slightly) related matter, the documentation for XT$RESIZE_WIDGET
    say that this resizes "a sibling widget of the child making the
    geometry request".  Which sibling?  Is this a documentation bug? 
    

T.RTitleUserPersonal
Name
DateLines
225.1LEOVAX::TREGGIARIThu Feb 16 1989 10:4813
Functions like XtResizeWidget are only supposed to be used by a geometry
manager on its children.  You should not be calling it.  

On the question why doesn't the label resize...  Here's a guess.
Geometry management requests go up the widget hierarchy until a geometry
manager says "yes".  What may be happening is this.  The label asks its parent
(the dialog box) to get bigger.  If this would cause the dialog box to get
bigger, it must asks its parent, etc....  If the answer from somewhere
"above" is "No", then that is what the dialog box will tell the label, and
the label will not be resized.

Leo

225.2ULTRA::WRAYJohn WrayThu Feb 16 1989 11:0915
>    Geometry management requests go up the widget hierarchy until a geometry
>manager says "yes".  What may be happening is this.  The label asks its parent
>(the dialog box) to get bigger.  If this would cause the dialog box to get
>bigger, it must asks its parent, etc....  If the answer from somewhere
>"above" is "No", then that is what the dialog box will tell the label, and
>the label will not be resized.

    So the problem might be that resizing the label would cause it to
    become longer that its parent DIALOG_BOX is wide, then?  I've set the
    parent dialog box to a fixed width myself, so the dialog box may well
    refuse to resize itself.  However, it's not an attached dialog box, so
    why can't the label just resize itself and get clipped by the dialog
    box?  Is there any way to make things behave this way? 
    

225.3LEOVAX::TREGGIARIThu Feb 16 1989 13:4121
 
>    So the problem might be that resizing the label would cause it to
>    become longer that its parent DIALOG_BOX is wide, then? 

Yes.

>    I've set the
>    parent dialog box to a fixed width myself, so the dialog box may well
>    refuse to resize itself.

Do you mean that you have set the DwtNresize resource to DwtResizeFixed,
or that you explicitly set the width.

>    However, it's not an attached dialog box, so
>    why can't the label just resize itself and get clipped by the dialog
>    box?  Is there any way to make things behave this way? 

If you didn't set the DwtNresize resource to DwtResizeFixed, try that.

Leo