Hi Y'all !
How would one "detect a click" on an empty sub-DGrid so as to open a dialog ?
-Sub-Grid content list all Descriptions related to the Main Grid list of existing records.
... if there are no description corresponding to a specific record, than grids remains empty :
Any time this is the case,
-> I would like to let the user click on the empty blank space and popup a message offering him to create a new record
..so first, I would need to detect a click anywhere on the blank sub-grid space...is that doable ?
Or any other way.
Thanks !
Behavior : How to detect a click on an empty datagrid space ?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9663
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Behavior : How to detect a click on an empty datagrid space ?
Hi.
Several messages are send when you click into a "blank" area of a DG, "mouseDown", "dgMouseDown", "mouseUp", to mention a few.
You might use the clickLoc to determine "where" the user, er, clicked, and knowing the physical attributes of the DG itself, also know which empty "cell" was clicked in.
Craig
Several messages are send when you click into a "blank" area of a DG, "mouseDown", "dgMouseDown", "mouseUp", to mention a few.
You might use the clickLoc to determine "where" the user, er, clicked, and knowing the physical attributes of the DG itself, also know which empty "cell" was clicked in.
Craig
Re: Behavior : How to detect a click on an empty datagrid space ?
Hi Craig,
Dahhh...it keeps frustrating me how simple LC can be to go straight to the point most of the time !
- still a long way to TS (Think Simple)
finally..came out with the wanted code :
Thanks again
Dahhh...it keeps frustrating me how simple LC can be to go straight to the point most of the time !
- still a long way to TS (Think Simple)
finally..came out with the wanted code :
Code: Select all
on mouseUp pButtonNumber
put the dgdata of grp "DGDetail" into tData
if tData is empty then
answer "Description is empty"
else
answer "Description is not empty"
end if
end mouseUp