Home » Eclipse Projects » Eclipse Platform » FormText Tabbing.
|
Re: FormText Tabbing. [message #335158 is a reply to message #335104] |
Tue, 24 March 2009 13:53 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 3/23/2009 9:10 AM, Irum Godil wrote:
> Hi,
>
> I am using a FormText control to display some labels, however, I want to
> prevent tab to enter into this control at all. Today it enters but does
> not show the cursor. I want the tab key to completely skip the FormText
> Control.
> Since I do not have direct access to the FormText code, I tried to add a
> listener for Tab key and reflectively invoke the "advance" method on it
> as follows, but this does not work either.
>
> label1.addListener(SWT.Traverse, new Listener() {
> public void handleEvent(Event e) {
> if (e.detail == SWT.TRAVERSE_TAB_NEXT) {
> try {
> Object obj = //reflective call to Advance
> e.doit = ((Boolean)obj).booleanValue();
> }
> ...
>
> });
>
> I will really appreciate if someone can tell me what to do here and how
> to resolve this issue.
Have a look at TraverseListener and TraverseEvent.
Hope this helps,
Eric
|
|
|
Re: FormText Tabbing. [message #335194 is a reply to message #335158] |
Wed, 25 March 2009 14:44 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Irum Godil![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=irum%40ca.ibm.com) Messages: 35 Registered: July 2009 |
Member |
|
|
Hi,
I did look at the classes mentioned by you, but it does not solve my
problem exactly. Basically, I have 2 controls in my form, one is a
FormText, and the other can be any SWT/more complex widget.
I actually have a series of them, so something like:
Label1 Text
Label2 Combo
Label3 Something more complex
Now, what I want is that the tab always comes in the 2nd field, but skips
all the labels.
If I set e.doit = false, for the labels, then the tab does not continue
past the first label. If I set it to true, I see the same behaviour as
today.
How can I just skip tab from the FormText, but ensure it goes to the next
control on the page?
Thanks for your responses.
Irum.
|
|
|
Re: FormText Tabbing. [message #335231 is a reply to message #335194] |
Thu, 26 March 2009 16:59 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Irum Godil![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=irum%40ca.ibm.com) Messages: 35 Registered: July 2009 |
Member |
|
|
Irum Godil wrote:
> Hi,
> I did look at the classes mentioned by you, but it does not solve my
> problem exactly. Basically, I have 2 controls in my form, one is a
> FormText, and the other can be any SWT/more complex widget.
> I actually have a series of them, so something like:
> Label1 Text
> Label2 Combo
> Label3 Something more complex
> Now, what I want is that the tab always comes in the 2nd field, but skips
> all the labels.
> If I set e.doit = false, for the labels, then the tab does not continue
> past the first label. If I set it to true, I see the same behaviour as
> today.
> How can I just skip tab from the FormText, but ensure it goes to the next
> control on the page?
> Thanks for your responses.
> Irum.
Hi,
I was hoping if someone can please help me on this one, or direct me to
some resources where I can find the solution.
Really appreciate your help.
Thanks,
Irum.
|
|
|
Re: FormText Tabbing. [message #335233 is a reply to message #335194] |
Thu, 26 March 2009 18:05 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: eclipse-news.rizzoweb.com
On 3/25/2009 10:44 AM, Irum Godil wrote:
> Hi,
> I did look at the classes mentioned by you, but it does not solve my
> problem exactly. Basically, I have 2 controls in my form, one is a
> FormText, and the other can be any SWT/more complex widget.
> I actually have a series of them, so something like:
>
> Label1 Text
> Label2 Combo
> Label3 Something more complex
>
> Now, what I want is that the tab always comes in the 2nd field, but
> skips all the labels.
> If I set e.doit = false, for the labels, then the tab does not continue
> past the first label. If I set it to true, I see the same behaviour as
> today.
> How can I just skip tab from the FormText, but ensure it goes to the
> next control on the page?
I don't understand; Label widgets don't take focus (on Windows, at
least). So the default focus traversal for a Composite should
automatically find the "next" focusable control.
Eric
|
|
|
Re: FormText Tabbing. [message #335235 is a reply to message #335233] |
Thu, 26 March 2009 18:11 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Irum Godil![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=irum%40ca.ibm.com) Messages: 35 Registered: July 2009 |
Member |
|
|
Eric Rizzo wrote:
> On 3/25/2009 10:44 AM, Irum Godil wrote:
>> Hi,
>> I did look at the classes mentioned by you, but it does not solve my
>> problem exactly. Basically, I have 2 controls in my form, one is a
>> FormText, and the other can be any SWT/more complex widget.
>> I actually have a series of them, so something like:
>>
>> Label1 Text
>> Label2 Combo
>> Label3 Something more complex
>>
>> Now, what I want is that the tab always comes in the 2nd field, but
>> skips all the labels.
>> If I set e.doit = false, for the labels, then the tab does not continue
>> past the first label. If I set it to true, I see the same behaviour as
>> today.
>> How can I just skip tab from the FormText, but ensure it goes to the
>> next control on the page?
> I don't understand; Label widgets don't take focus (on Windows, at
> least). So the default focus traversal for a Composite should
> automatically find the "next" focusable control.
> Eric
Hi,
In my example, the Labels are actually "FormText" object and they are
taking focus, although I do not see any cursor.
Thanks.
|
|
| |
Goto Forum:
Current Time: Sun Sep 01 06:01:43 GMT 2024
Powered by FUDForum. Page generated in 0.03023 seconds
|