I found that the best way to get a column number is to use item 1 of the clickloc, subtract the left of the field to get the relative x- value for the click in the field (you may have to also correct for the borderwidth of the field)), then compare with the tabstops. This always gives the accurate column number no matter whether you click on white space or text.

-- Peter

Peter M. Brigham
[email protected]
http://home.comcast.net/~pmbrig


On May 26, 2010, at 6:53 PM, J. Landman Gay wrote:

Mark Stuart wrote:
on 5/26/2010, Jacqueline wrote:
Something like this:
 put word 4 of the clickchunk into tCharNum
 subtract (the number of chars in line 1 to \
    (word 2 of the clickline)-1 of me) +1 from tCharNum
 set the itemdel to tab
 put the number of items in char 1 to tCharNum of the value of the
clickLine
<<
Hi,
I tried your script and it worked as is, but not as planned.
When clicking in the white space of a column, it returns the number 4.
When clicking on the text of a column, a number is returned.
But when clicking in the far left column, it returns 0 (zero).

That's technically correct because there aren't any items before the text starts. You could put in a single exception for that special case: if tNumber < 1 then put 1 into tNumber.

--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to