Trouble with Tabstop/traversalOn and textbox widths

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: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
Paul D
Posts: 116
Joined: Mon May 21, 2007 6:58 pm

Trouble with Tabstop/traversalOn and textbox widths

Post by Paul D » Mon Jul 02, 2007 8:59 pm

I am having trouble figuring out a couple of things...

First, how do I stop the user from entering text past the width of the text entry field. Second, I can not figure out how to set the proper tabstops. I have the layers in the order I want but whenever I get to a text entry field and hit the tab button it just tabs the text inside of the textbox and doesn't actually move the cursor to the next layer. The book I have says to make sure the traversalOn property is set to true but I cant find that property in the property inspector. What am I missing here?

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

Post by BvG » Tue Jul 03, 2007 11:37 am

the "traversalOn" toggle in the inspector is named "Focusable". If you mouse over it, the tooltip should tell you that (RunRev likes renaming stuff, so they aren't the same in the interface as in the language)
Various teststacks and stuff:
http://bjoernke.com

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

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Location: Aalst, Belgium
Contact:

Post by Janschenkel » Tue Jul 03, 2007 11:41 am

Hi Paul,

Before I answer your actual question, here's a tip with regards to properties and the inspector palette: iif you want to see the actual property names as used in the programming language, modify the preferences. In the 'General' tab, at the top you see a radio set to control whether the property labels are a description of the option, or the name of the Transcript property.
Also, when you have hover the mouse over an item in the property inspector palette, the tooltip will show you the opposite of this setting: if your preference is to display the description of the property, then the tooltip will show the Transcript property name, and vice versa.

Anyway, back to the question at hand.

The 'layer' property determines the tab order of controls on your card.
However, if your field has its 'traversalOn' property set to false, it cannot receive keyboard focus. ('Basic properties' pane of the Field inspector)

Another property that determines the way tabbing is handled, is the 'tabStops' property of the field. ('Table' pane of the Field inspector)
Even if you don't show the 'vertical grid' of the field, if the 'tabStops' is not empty, it will take your typing of the tab key as a sign that you want to hop to the next tab stop within the field.

While we're at it: if you want the cursor to hop to the next field when the user hits the enter or return key, turn on the 'autoTab' property ('Basic properties' pane of the Field inspector).

Hope this helped,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Paul D
Posts: 116
Joined: Mon May 21, 2007 6:58 pm

Post by Paul D » Tue Jul 03, 2007 6:51 pm

Thanks a lot Jan that was exactly what I was looking for! :D

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”