Text Field: how to lock TAB button?

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
ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Text Field: how to lock TAB button?

Post by ale870 » Sun Aug 09, 2009 9:31 pm

Hello,

I created a text area, and I need to insert a TAB (in text area) and not sending focus to the next field.
How can I modify behaviour of TAB keyboard button?

Thank you!

ale870
Posts: 250
Joined: Tue Apr 22, 2008 9:17 am
Contact:

Post by ale870 » Sun Aug 09, 2009 10:06 pm

Solved!
I putted the event on rawKeyDown argKey and used the following code:

Code: Select all

if argKey is 65289 then
   put tab before char (word 2 of the selectedChunk) of field "fldMain"
end if
Please note that field "fldMain" is field where I need to intercept TAB.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Post by BvG » Mon Aug 10, 2009 6:53 am

if you set the tabstop property to any value (on the table tab of the inspector) then tab entry works as expected.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Post Reply