Next focus or Exit key stroke from Field Editor when Editing Data Grid Table Column

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
aetaylorBUSBnWt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 118
Joined: Thu Sep 20, 2012 5:11 pm

Next focus or Exit key stroke from Field Editor when Editing Data Grid Table Column

Post by aetaylorBUSBnWt » Sat Oct 22, 2022 4:37 pm

Hi,

When editing a Data Grid Table Column, one has to put in a CloseFieldEditor handler to capture the modified text.

Now how do you keep the default behavior and either advance to the next column or go back the previous column, or just stop?

ie, tab key, shift tab key, return or enter.

These actions do NOT occur anymore once you have a CloseFieldEditor handler in your column behavior.

I tried "pass CloseFieldEditor" to supposedly go to the default handler - does NOT work.

Eventually I did find the code posted that told me to:

Code: Select all

put the dgColumnNumber of me into theNumber
put line theNumber of the dgProp["columns"] of group "myDataGrid" into theName
send "EditCellOfIndex " & theName & ", " & theIndex to the group "fSpaceList" in 2
where theName is the next column name to go to and theIndex is that of the current hilited line.

BUT, that is NOT what should be happening if anything other than the tab key pressed.

tabkey, return and enter handlers in the column behavior never get called - probably because the FieldEditor has control.

I have no interest in interfering with the FieldEditor itself - that is a whole crazy level of trouble to get into.

So how to find what the "next focus" would be?

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”