Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355524 - StyledText: Horizontal scrollbar is not reset when calling setText(String)
Summary: StyledText: Horizontal scrollbar is not reset when calling setText(String)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.2   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.8 M2   Edit
Assignee: Felipe Heidrich CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-23 11:10 EDT by Nam Quang Tran CLA
Modified: 2011-08-24 10:34 EDT (History)
1 user (show)

See Also:


Attachments
StyledText with clear button (2.10 KB, text/x-java)
2011-08-23 11:11 EDT, Nam Quang Tran CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nam Quang Tran CLA 2011-08-23 11:10:52 EDT
Build Identifier: 

When the StyledText displays a horizontal scrollbar and the text is cleared by calling StyledText.setText(""), the horizontal scrollbar is not updated. However, this problem does not occur when the text is cleared by manually selecting and deleting the text.

Reproducible: Always

Steps to Reproduce:
1) Run the attached snippet and click on the 'Clear' button. Result: The horizontal scrollbar is not reset correctly, but the vertical scrollbar is.

2) Re-run the snippet, delete all text by pressing Ctrl+A, then Delete key. Result: Both scrollbars are reset correctly.
Comment 1 Nam Quang Tran CLA 2011-08-23 11:11:56 EDT
Created attachment 202009 [details]
StyledText with clear button
Comment 2 Nam Quang Tran CLA 2011-08-23 11:15:41 EDT
This was tested against SWT 3.7.