How to refresh a Combo ? [message #467043] |
Mon, 23 January 2006 12:53  |
Eclipse User |
|
|
|
Hi to all,
I've a dialog which contains a Combo and a simple Button "new".
When I click on the "new" button, an input dialog opens. When the user
enter a value and click OK, I would like to refresh the combo with this
new value.
I tried combo.update(), combo.layout() and combo.redraw(). Nothing works!
Have you got any ideas ?
Thanks a lot for your help.
Dov
|
|
|
|
Re: How to refresh a Combo ? [message #467072 is a reply to message #467060] |
Tue, 24 January 2006 03:23  |
Eclipse User |
|
|
|
Thanks a lot Gail, it works fine !
Best regards
Dov
Gail Jakubowski a écrit :
> Something like:
> MyDialog dlg = new MyDialog(myShell);
> int rc = dlg.open();
> String newname = "";
> if (rc == Window.OK) {
> newname = dlg.getText();
> if (newname.trim().length() == 0)
> // User selected OK with empty field. Ignore.
> return;
> myCombo.add(newname);
> myCombo.computeSize(SWT.DEFAULT,SWT.DEFAULT,true);
> myCombo.layout();
> myComboContainer.layout();
> }
>
>
> "Dov MORYUSEF" <moryusef@hotmail.com> wrote in message
> news:dr357b$vn8$1@utils.eclipse.org...
>
>>Hi to all,
>>
>>I've a dialog which contains a Combo and a simple Button "new".
>>When I click on the "new" button, an input dialog opens. When the user
>>enter a value and click OK, I would like to refresh the combo with this
>>new value.
>>I tried combo.update(), combo.layout() and combo.redraw(). Nothing works!
>>
>>Have you got any ideas ?
>>
>>Thanks a lot for your help.
>>
>>Dov
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.05110 seconds