Mozilla
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Web Development Archives Mailing Lists Mozilla

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Web Development Archives Sponsor:
  #1  
Old July 10th, 2007, 07:01 AM
mixit
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
context click pixel offsets wrong for MS-Windows XUL client

or rather, I should say, they MAY be wrong:

I have a scrolling tree 10 columns and column headers with a context
menu attached.
I have a function that checks the location of the context mouse-click
and enables/disables
various menu items in the context menu depending on the nature of the
cell/column/row clicked on, acquiring the cell details using
treeBCellAt()

The standard mechanism for accessing the mouse position would be:

var mX = popupevent.clientX -
var mY = popupevent.clientY -

but in this instance, the Y-coordinates of the context click are out
by 23 pixels (precisely the height of the tree column head).

I have examined all the following variables to see if there is some
other way of getting the right values but have found nothing useful,
no matter what math I do:
popupevent.clientX
popupevent.clientY
popupevent.layerX
popupevent.layerY
popupevent.pageX
popupevent.pageY


X
Y


X
Y

Can somebody advise me if there is a way to get the absolutely correct
Y-coordinate of the context click?

or is this a bug?


dev-tech-xul mailing list
dev-tech-xul (AT) lists (DOT) mozilla.org

Reply With Quote
  #2  
Old July 10th, 2007, 08:31 AM
Neil Deakin
Guest
Dev Archives Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
context click pixel offsets wrong for MS-Windows XUL client

mixit wrote:
or rather, I should say, they MAY be wrong:

I have a scrolling tree 10 columns and column headers with a context
menu attached.
I have a function that checks the location of the context mouse-click
and enables/disables
various menu items in the context menu depending on the nature of the
cell/column/row clicked on, acquiring the cell details using
treeBCellAt()

The standard mechanism for accessing the mouse position would be:

var mX = popupevent.clientX -
var mY = popupevent.clientY -

but in this instance, the Y-coordinates of the context click are out
by 23 pixels (precisely the height of the tree column head).


You should just be passing clientX and clientY directly to getCellAt.

/ Neil

dev-tech-xul mailing list
dev-tech-xul (AT) lists (DOT) mozilla.org

Reply With Quote
Reply

Viewing: Web Development Archives Mailing Lists Mozilla > context click pixel offsets wrong for MS-Windows XUL client


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT