Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Strange behaviour using ElementListSelectionDialog
Strange behaviour using ElementListSelectionDialog [message #133233] Mon, 18 May 2009 15:19 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:how to have a secure perspective?
Next Topic:JFace Viewer Performance
Goto Forum:
  


Current Time: Fri Apr 26 15:40:26 GMT 2024

Powered by FUDForum. Page generated in 0.04575 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top