|Re: PopupList questions [message #445225 is a reply to message #445216]
||Thu, 28 October 2004 19:09
| Aashish Patil
Registered: July 2009
My snippet is after this mail body. I did manage to get it working.
- The PopupList.open(Rectangle) documentation is a bit confusing. It seemed
to me that it meant the size of the popup list rectangle that is drawn.
However, the height in the rectangle is interpretated to be the distance
below the x,y coordinates from which the popup list starts to get drawn.
Due to this if my code mentioned 100 it start drawing 100 units below the
mouse pointer. Finally, I reduced it to 10 so it would start drawing near
the mouse pointer. Thus, it was not a problem with Display class as I had
mentioned in my email.
- The PopupList 2 argument constructor seems to be having the following line
list = new List(shell, SWT.SINGLE | SWT.V_SCROLL);
Does it mean that the V_SCROLL is hardcoded into it and one cannot have a
H_SCROLL? I have
been unable to get the H_SCROLL working as yet.
PopupList oldQueryListBox = new
PopupList(QueryView.this.getSite().getShell(), SWT.H_SCROLL | SWT.V_SCROLL);
String selectedQuery = oldQueryListBox.open(rect);
"Steve Northover" <firstname.lastname@example.org> wrote in message
> Please post a small stand alone snippet for us to debug. Thanks.
> "Aashish Patil" <email@example.com> wrote in message
> > Hello,
> > I am trying to use a popup list within my plugin. The list opened from
> > within an JFace Action.
> > 1. How do I enable scrollbars. I tried providing SWT.H_SCROLL |
> > in the
> > constructor but no effect.
> > 2. How do I get the current mouse position on the screen? I tried
> > Display.getCurrent().getCursorLocation(); However, that does not seem to
> > returning the correct mouse location. I passed in the x,y values
> > this method to the PopupList.open() but it does not open up next to the
> > mouse.
> > Thank you
> > Regards,
> > Aashish
Powered by FUDForum
. Page generated in 0.01565 seconds