Popup panel over the cursor

2009-02-06 Thread ArunDhaJ

Hi,
I've a tree and context menu associated with it. When I right click a
tree item the context menu will pop-up below the cursor. In case the
tree item at bottom of the page. the menu generated extends the page
further. I need to scroll the page to see few of my menu items.. worst
is that, when I click the scroll bar, the menu disappears...

How can I identify whether the cursor is at bottom of the page and
generate menu over the cursor???

plz suggest me...


Regards,
ArunDhaJ
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Popup panel over the cursor

2009-02-06 Thread Litty Preeth
int posLeft = event.getScreenX();
if ((posLeft + popupWidth)  (Window.getClientWidth() + Window
.getScrollLeft()))
posLeft = posLeft
- (posLeft + popupWidth - (Window.getClientWidth() +
Window
.getScrollLeft()));

int posTop = event.getScreenY();
if ((posTop + popupHeight)  (Window.getClientHeight() + Window
.getScrollTop()))
posTop = posTop
- (posTop + popupHeight - (Window.getClientHeight() +
Window
.getScrollTop()));
popUpPanel_.setPopupPosition(posLeft, posTop);
popUpPanel_.show();

On Fri, Feb 6, 2009 at 2:13 PM, ArunDhaJ arund...@gmail.com wrote:


 Hi,
 I've a tree and context menu associated with it. When I right click a
 tree item the context menu will pop-up below the cursor. In case the
 tree item at bottom of the page. the menu generated extends the page
 further. I need to scroll the page to see few of my menu items.. worst
 is that, when I click the scroll bar, the menu disappears...

 How can I identify whether the cursor is at bottom of the page and
 generate menu over the cursor???

 plz suggest me...


 Regards,
 ArunDhaJ
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Google Web Toolkit group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---