Home » Eclipse Projects » Eclipse Platform » FormText Tabbing.
FormText Tabbing. [message #335104] |
Mon, 23 March 2009 09:10  |
Eclipse User |
|
|
|
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.
Thanks,
Irum.
|
|
| |
Re: FormText Tabbing. [message #335194 is a reply to message #335158] |
Wed, 25 March 2009 10:44   |
Eclipse User |
|
|
|
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 12:59   |
Eclipse User |
|
|
|
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 14:05   |
Eclipse User |
|
|
|
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 14:11   |
Eclipse User |
|
|
|
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: Thu May 08 23:51:40 EDT 2025
Powered by FUDForum. Page generated in 0.05831 seconds
|