Tab stop design question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Tab stop design question

Schwab,Wilhelm K
Hello all,

Picture a bunch of text edits with the user tabbing between them.  One
is multi-line.  The user tabs to it, Windows selects the text, and the
next tab overwrites the text - ouch!

Are there any standard ways around it?  Expecting the user to press
control-tab won't cut it; the damage is done by that point.  Undo might
help, but only if they realize they did it :(

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Tab stop design question

Andy Bower-3
Bill,
 
> Picture a bunch of text edits with the user tabbing between them.
> One is multi-line.  The user tabs to it, Windows selects the text,
> and the next tab overwrites the text - ouch!
>
> Are there any standard ways around it?  Expecting the user to press
> control-tab won't cut it; the damage is done by that point.  Undo
> might help, but only if they realize they did it :(

If you turn the #wantTab aspect off in the multi-line then it will
ignore all TAB presses and allow them to be used to tab on to the next
field without destroying the existing contents. The only(?) problem
with this approach is, of course, that one can no longer type TAB
characters into that fields.

Best regards

Andy Bower
Dolphin Support
www.object-arts.com


Reply | Threaded
Open this post in threaded view
|

Re: Tab stop design question

Ian Bartholomew-19
In reply to this post by Schwab,Wilhelm K
Bill,

> Picture a bunch of text edits with the user tabbing between them.  One is
> multi-line.  The user tabs to it, Windows selects the text, and the next
> tab overwrites the text - ouch!
>
> Are there any standard ways around it?

Have a look at the #wantTab and #isSelectionKept attributes of the
MultilineTextEdit.

The following demos your problem...

s := Shell show.
s view addSubView: (t := TextEdit new).
t position: 10@10.
t value: 'ONE'.
s view addSubView: (t := MultilineTextEdit new).
t position: 10@50.
t value: 'TWO
THREE
FOUR
FIVE'.
"***"
s view addSubView: (t := TextEdit new).
t position: 10@150.
t value: 'SIX'

Replacing the "***" with ....

t wantTab: false.

stops the tab being used within the MTE, and following that with...

t isSelectionKept: false.

stops the selection being retained while the MTE is not the focus

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.


Reply | Threaded
Open this post in threaded view
|

Re: Tab stop design question

Schwab,Wilhelm K
In reply to this post by Andy Bower-3
Andy,

> If you turn the #wantTab aspect off in the multi-line then it will
> ignore all TAB presses and allow them to be used to tab on to the next
> field without destroying the existing contents. The only(?) problem
> with this approach is, of course, that one can no longer type TAB
> characters into that fields.

Thanks!

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]