Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-swt-dev] SWT 101

I have to add a GridData object to my text because you don't change the label text without a call to layout.  That's not particularly intuitive  Why is constantly resizing the text object was a good thing?  And if it's a good thing, why isn't the widhth zero pixels the first time?  Because of the setTextWidth?  If so, why isn't that behavior carried forward?
 
It's not that your decisions are necessarily bad (although I will question the issue of public attributes forever), it's just that they're not particularly intuitive.  Swing works the way I expect it to.  SWT makes me do extra work to get it to work the way I expect it to.
 
Joe
 
From: Steve_Northover@xxxxxxxxxx
    
    //***SN - Use GridData to fix the width
    GridData textData = new GridData ();
    textData.widthHint = 80;
    f1.setLayoutData (textData);

//        ***SN - use layout to cause a layout
        shell.layout ();

Back to the top