Jim Sims wrote/ schreef:
> Is there a way to limit the number of tab stops that a line can have?
>
> Is there some sort of "tabStopsNumber" or some sort of limiting
> thing I can use?
The tabStopsNumber doesn't exits (if it would, it would be more like maxTabs
or something), but you *can* script this behaviour. When the user hits the
tab key, the tabKey message is sent to the field. You have to grab this
message, and only pass it (so that there will be an extra tab on this line)
if there are 4 or less tabs on this (selected) line.
Put this script into your field:
on tabKey
if count(tab,value(the selectedLine of me)) is 4 then beep
else pass tabKey
end tabKey
function count cPart,cWhole
-- this function count the occurence of cPart in cWhole
local cCount
repeat for each char c in cWhole
if c is cPart then add 1 to cCount
end repeat
return cCount
end count
Then it will not allow the user to type in more than 4 tabs on a line. If
the user tries to, though, it will beep. Of course you can also display a
message or something. The 'beep' would then be 'answer "You can only type
four tabs on a line." with "Got it!"' or something.
> sims
Hope this helps,
Sjoerd
Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.