Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SWT: Is dynamic resize of Combo possible?

Bhavani Kumar
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic