Code: Select all
on mouseMove
put the pgMouseCell of widget "PolyGrid" into fld "MouseCell" -- returns point (col,row)
end mouseMove
Thanks
Mark
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Code: Select all
on mouseMove
put the pgMouseCell of widget "PolyGrid" into fld "MouseCell" -- returns point (col,row)
end mouseMove
Code: Select all
on mouseMove
get the pgMouseCell of widget "PolyGrid" -- does it go into "it"?
put it into fld "MouseCell" -- returns point (col,row)
end mouseMove
Code: Select all
on mousemove
put the pgMouseCell of widget "PolyGrid1"
end mousemove
Thanks Klaus. Fooling around I got it to work. But there is at least one requirement and one restriction which makes it challenging for what I was trying to do. I was attempting to drag things from outside the PG into the PG and deposit them in particular columns (or cells). As far as I can tell, the pgMouseCell function does not work on unpopulated (ie. empty) rows. I had to have something in the grid before it worked, and it only worked over the populated rows. 2nd, it doesn't work if the mouse is down outside the PG and then you continue the hovering process inside the PG as you would if you were dragging something in. It works fine if the mouse down is initiated inside the PG. But if the mouse is down BEFORE you start dragging over the PG, there is no response. At least that has been my brief experience (pls let me know if you experience the same). Perhaps there is some other way to do this. I am attempting a drag and drop UI where the user drags SQLite column specs from another table into the PG. I have this working for dragging into LC fields, just not the PG. In general all I really need to know is "where am I" when I deposit the object/bundle into the PG. If I know "where" I am I can figure out how to code the rest (I think). (Of course the next step requires setting the column name from script but I am hoping there is function for doing that... I am still going through the list of options to figure that out).Klaus wrote: ↑Wed Mar 08, 2023 5:22 pmCode: Select all
on mousemove put the pgMouseCell of widget "PolyGrid1" end mousemove