Strange behaviour using ElementListSelectionDialog [message #133233] |
Mon, 18 May 2009 15:19 |
Eclipse User |
|
|
|
Originally posted by: niels.lippke.airpas.com
Hi,
if I open an ElementListSelectionDialog with e.g. 100 Elements, only ~20 are
shown at once (at least in my case).
I need to select at least 5 times an arbitrary element to "see the list
grow" and get it complete.
I use the following code to create my dialog:
ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell,
new LabelProvider(){
public String getText(Object element) {
return (String) (element);
}});
dialog.setTitle("Select ...");
dialog.setMessage("Select an entry (* = any string, ? = any char):");
String[] arr = new String[100];
for (int i=0;i<100;i++) {
arr[i] = "Element " + i;
}
dialog.setElements(arr);
dialog.open();
Is there a chance to have the list completely visible at once?
Regards,
Niels
|
|
|
Re: Strange behaviour using ElementListSelectionDialog [message #133801 is a reply to message #133233] |
Wed, 20 May 2009 15:09 |
Eclipse User |
|
|
|
Originally posted by: niels.lippke.airpas.com
Ah, I got it. The elements of the list are added/filtered using a
WorkbenchJob.
Wrapping the dialog in
UICallBack.activate();
....
UICallBack.deactivate();
does the trick. Very nice!
Cheers,
Niels
"Niels Lippke" <niels.lippke@airpas.com> schrieb im Newsbeitrag
news:gurua5$q0j$1@build.eclipse.org...
> Hi,
>
> if I open an ElementListSelectionDialog with e.g. 100 Elements, only ~20
> are shown at once (at least in my case).
> I need to select at least 5 times an arbitrary element to "see the list
> grow" and get it complete.
>
> I use the following code to create my dialog:
>
> ElementListSelectionDialog dialog = new ElementListSelectionDialog(shell,
> new LabelProvider(){
> public String getText(Object element) {
> return (String) (element);
> }});
>
> dialog.setTitle("Select ...");
> dialog.setMessage("Select an entry (* = any string, ? = any char):");
> String[] arr = new String[100];
> for (int i=0;i<100;i++) {
> arr[i] = "Element " + i;
> }
> dialog.setElements(arr);
> dialog.open();
>
> Is there a chance to have the list completely visible at once?
>
> Regards,
>
> Niels
|
|
|
Powered by
FUDForum. Page generated in 0.04575 seconds