Text should support SWT.NO_FOCUS? [message #448455] |
Mon, 10 January 2005 11:46  |
Eclipse User |
|
|
|
In a dialog, I want a multi-line display of textual information (e.g.,
as a user feedback area). Label doesn't support getLineHeight() and I
understand from reading that SWT.WRAP support is dependent on the layout
manager and is "spotty." Text works for what I want, but I can't easily
block its accepting focus (e.g., SWT.READ_ONLY still allows cursor to
land in the field, causing extra tabbing to reach the next editable
field). IMHO, Text should provide a way to keep the widget from
accepting focus and moving control to the next control in the tab order.
I can likely code this using focus listeners but thought support for
SWT.NO_FOCUS (or an update to SWT.READ_ONLY behavior) would make more sense.
Best Regards, Nat
|
|
|
Re: Text should support SWT.NO_FOCUS? [message #448467 is a reply to message #448455] |
Mon, 10 January 2005 13:12   |
Eclipse User |
|
|
|
It's not a bad idea. You could enter a bug report. In the mean time, you
can use Composite.setTabList() to remove the text control from the tab list
so the user won't be able to tab to it (if this is really what you want).
"W. Nathaniel Mills, III" <nat@classobjects.com> wrote in message
news:crubhd$o10$1@www.eclipse.org...
> In a dialog, I want a multi-line display of textual information (e.g.,
> as a user feedback area). Label doesn't support getLineHeight() and I
> understand from reading that SWT.WRAP support is dependent on the layout
> manager and is "spotty." Text works for what I want, but I can't easily
> block its accepting focus (e.g., SWT.READ_ONLY still allows cursor to
> land in the field, causing extra tabbing to reach the next editable
> field). IMHO, Text should provide a way to keep the widget from
> accepting focus and moving control to the next control in the tab order.
> I can likely code this using focus listeners but thought support for
> SWT.NO_FOCUS (or an update to SWT.READ_ONLY behavior) would make more
sense.
>
> Best Regards, Nat
|
|
|
Re: Text should support SWT.NO_FOCUS? [message #448480 is a reply to message #448467] |
Mon, 10 January 2005 18:41  |
Eclipse User |
|
|
|
Steve Northover wrote:
> It's not a bad idea. You could enter a bug report. In the mean time, you
> can use Composite.setTabList() to remove the text control from the tab list
> so the user won't be able to tab to it (if this is really what you want).
>
> "W. Nathaniel Mills, III" <nat@classobjects.com> wrote in message
> news:crubhd$o10$1@www.eclipse.org...
>
>>In a dialog, I want a multi-line display of textual information (e.g.,
>>as a user feedback area). Label doesn't support getLineHeight() and I
>>understand from reading that SWT.WRAP support is dependent on the layout
>>manager and is "spotty." Text works for what I want, but I can't easily
>>block its accepting focus (e.g., SWT.READ_ONLY still allows cursor to
>>land in the field, causing extra tabbing to reach the next editable
>>field). IMHO, Text should provide a way to keep the widget from
>>accepting focus and moving control to the next control in the tab order.
>> I can likely code this using focus listeners but thought support for
>>SWT.NO_FOCUS (or an update to SWT.READ_ONLY behavior) would make more
>
> sense.
>
>>Best Regards, Nat
>
>
>
I ended up using a focus listener whose focusGained would explicitly
setFocus on the "next" control, effectively skipping over the Text
control. I'll try entering the bug report -- I expect adding NO_FOCUS
is easier to adopt as it won't break existing code function where folks
used READ_ONLY.
|
|
|
Powered by
FUDForum. Page generated in 0.03471 seconds