wood burning stoves 2.0
The moose likes Swing / AWT / SWT and the fly likes SWT: Is dynamic resize of Combo possible? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "SWT: Is dynamic resize of Combo possible?" Watch "SWT: Is dynamic resize of Combo possible?" New topic

SWT: Is dynamic resize of Combo possible?

Bhavani Kumar

Joined: Feb 22, 2005
Posts: 15
Hi all,
My scenario is : I have 2 combos in a Composite. Depending on the value selected in the first Combo, the second Combo is populated. Now the values in the second combo are of variable length, so i need to resize the combo depending on the length of the text. Is it possible, since we place the combos on the composite in the beginning itself ?


msgFmtCmb = new Combo(paramComp, SWT.READ_ONLY);
gridData = new GridData();
gridData.horizontalSpan = 2;

msgTypeCmb = new Combo(paramComp, SWT.READ_ONLY);
final GridData grdDataMsgType = new GridData();
grdDataMsgType.horizontalSpan = 2;

In the modifyText method, i am removing all values from the second combo and adding new values.
I agree. Here's the link: http://aspose.com/file-tools
subject: SWT: Is dynamic resize of Combo possible?
It's not a secret anymore!