JDK-4095946 : 592677:TEXTFIELD TAB SELECTION CONFUSING; REMOVE ES_NOHIDESEL STYLE IN
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.1.5,1.2.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_95,windows_nt
  • CPU: x86
  • Submitted: 1997-12-01
  • Updated: 2020-11-06
  • Resolved: 2003-05-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Description

Name: gvC48267			Date: 12/01/97


In Win32, the peer for java.awt.TextField gets created with the ES_NOHIDESEL
style bit set.  This is NOT the usual style for most other Windows programs    
users are familiar with, and this causes the tabbing and selection to be       
different and confusing (IMHO).  Suggest removing the ES_NOHIDESEL style from  
AwtTextField::Create() in awt_TextField.cpp.                                   
-                                                                              
Specifically, in most Windows apps, the text in a text field gets selected     
when tabbed to, and gets unselected when tabbed away.  Any state of selection  
performed by the user is discarded when tabbed away.  But in Java, the state   
of selection persists visually even when the user tabs away.  This can lead to 
multiple apparent selections being on screen at the same time, which can be    
confusing for a Windows user.                                                  
-                                                                              
One possible workaround would be to subclass TextField and add the desired     
Windows-like behavior -- but of course that's not cross-platform!  Since an    
original intent of peered components is to get the native platform's look-     
and-feel, this whole selection policy needs to remain the peer's job.          
(In this case, the default n|c behavior *is* different from Windows.)          
-                                                                              
[Verified in 1.1.4.8o & 1.1.5J; probably the same in every JDK since 1.0.]
(Review ID: 21022)
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b08
14-06-2004

EVALUATION mike.somlo@eng 1997-12-10: I agree, the ES_NOHIDESEL bit should be removed. Changing state of this bug to evaluated. See a similar report: 4032727. eric.hawkes@eng 1999-12-15 commit to tiger. xianfa.deng@Eng 2000-01-21 Name: dkR10074 Date: 04/16/2003 Here is an excerpt from MSDN Library: -------------------------------------------------------------- ES_NOHIDESEL Negates the default behavior for an edit control. The default behavior hides the selection when the control loses the input focus and inverts the selection when the control receives the input focus. If you specify ES_NOHIDESEL, the selected text is inverted, even if the control does not have the focus. -------------------------------------------------------------- An existing behavior of our text components looks confused and is inconsistent with a behavior of native win32 text controls. The fix removes the ES_NOHIDESEL style from TextField and TextArea. Now, the focused component has its selection highlighted only. ###@###.### 2003-04-16 ======================================================================
16-04-2003