selecting line from Datagrid - scrollbar interferes
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
selecting line from Datagrid - scrollbar interferes
I want to select a line from a DataGrid and have it go to a url connected with that line. Everything's good - except my object script is based on OnMouseUp...so when I use the scrollbar to scroll down my DataGrid, on mouseUP, it takes the original line that the scrollbar started on and acts like it was selected. If it can't figure out what line I started with, it just opens a blank url. Needless to say, urls are opening all over the place!
How do I set it up so that it is on mouseUP in a specific column within the DataGrid?
Thanks again...
How do I set it up so that it is on mouseUP in a specific column within the DataGrid?
Thanks again...
Re: selecting line from Datagrid - scrollbar interferes
are you using a form or table?
-
- VIP Livecode Opensource Backer
- Posts: 9662
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: selecting line from Datagrid - scrollbar interferes
Hi.
Can't you check the target and not send your url stuff if it happens to be the scrollbar?
Craig Newman
Can't you check the target and not send your url stuff if it happens to be the scrollbar?
Craig Newman
Re: selecting line from Datagrid - scrollbar interferes
Looks like this is a special "feature" of datagrids!
If you add the "mouseup" script to the datagrid group directly
then the "mouseup" is also being triggered when you use the scrollbar,
since the scrollbar is actually a separate object in the complex datagrid "group".
Try this:
Or use the behavior of the datagrid to handle your "mouseup" stuff, that will not affect the scrollbars!
Best
Klaus
If you add the "mouseup" script to the datagrid group directly
then the "mouseup" is also being triggered when you use the scrollbar,
since the scrollbar is actually a separate object in the complex datagrid "group".
Try this:
Code: Select all
...
if word 1 of the target <> "scrollbar" then
## do your URL stuff here
end if
...
Best
Klaus
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
Re: selecting line from Datagrid - scrollbar interferes
It is a beautiful thing! I used
if word 1 of the target <> "scrollbar" then
launch url theDataC["Link Address"]
end if
and the scrollbar is no longer my enemy
Thanks
if word 1 of the target <> "scrollbar" then
launch url theDataC["Link Address"]
end if
and the scrollbar is no longer my enemy
Thanks