Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 236739

Summary: [Forms] FormText needs a Caret
Product: [Eclipse Project] Platform Reporter: Mike Higginbotham <higginmi>
Component: User AssistanceAssignee: Adam Archer <agarcher>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: agarcher
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Mike Higginbotham CLA 2008-06-11 16:51:48 EDT
Build ID: I20080530-1730

Steps To Reproduce:
1. Place a FormText on a form.
2. Tab or select the FormText.
3. No Caret is displayed.



More information:
The above steps assume an installation of Eclipse without the changes made by 178557 or with those changes rolled back.

I think the real error with problem 1 of 178557 was that the FormText did not give any indication it had focus. It needs a Caret. The Canvas superclass allows you to set a Caret on it and that works. However, none of the expected Caret functionality (e.g., movement using arrow keys, text selection) is available.

This enhancement request is for the FormText to be given a fully functional Caret.
Comment 1 Adam Archer CLA 2008-07-02 18:00:01 EDT
The caret will not be added by default since it will change FormText behaviour in a way that some consumers might not like.

As a workaround to the problem of FormText accepting focus without rendering it, I have added support for the SWT.NO_FOCUS style on FormText. See bug 236735 comment 15 for details.

I plan on investigating the possibility of adding a new style bit along the lines of FormText.PAINT_FOCUS to cause FormText to render its focus. However, I don't think a Caret is the right solution. FormText is intended to mimic browser behaviour in a very light-weight widget. Use of a caret is not browser-like. Instead the flag will likely cause a focus box to be painted around the FormText.
Comment 2 Adam Archer CLA 2008-07-08 15:53:29 EDT
A focus box has been added to FormText by default. No style bit is needed. See bug 236735 comment 20.

Closing as WONTFIX.