Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Text should support SWT.NO_FOCUS?
Text should support SWT.NO_FOCUS? [message #448455] Mon, 10 January 2005 16:46 Go to next message
Nathaniel Mills is currently offline Nathaniel MillsFriend
Messages: 22
Registered: July 2009
Junior Member
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 18:12 Go to previous messageGo to next message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
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 23:41 Go to previous message
Nathaniel Mills is currently offline Nathaniel MillsFriend
Messages: 22
Registered: July 2009
Junior Member
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.
Previous Topic:incremental search
Next Topic:Source of word processing type icons for Eclipse platform?
Goto Forum:
  


Current Time: Fri Apr 19 22:49:06 GMT 2024

Powered by FUDForum. Page generated in 0.02719 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top