Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 231761 - [ScrolledComposite] setSelection broken with alwaysShowScroll
Summary: [ScrolledComposite] setSelection broken with alwaysShowScroll
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.0   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 1.3 M2   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: patch
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-13 04:56 EDT by Christian Janz CLA
Modified: 2009-09-22 07:48 EDT (History)
0 users

See Also:


Attachments
ScrollCompositeLCA patch (734 bytes, patch)
2008-05-13 04:59 EDT, Christian Janz CLA
ivan: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Janz CLA 2008-05-13 04:56:21 EDT
When the content of a ScrolledComposite is updated and becomes smaller so that no scroll bars are needed any more and alwaysShowScroll is set to true, a call to setOrigin(0,0) or a call to Scrollbar#setSelection(0) has no effect. This call is necessary because otherwise the updated content is positioned wrong (that means invisible).

The problem is that the ScrolledCompositeLCA only writes out the barSelection if the Scrollbar is visible. But if alwaysShowScroll is enabled the ScrollBar isn't visible but the change of the barSelection needs to be written to the browser to set the scrollTop/scrollLeft properties of the container.

With the attached patch of the ScrolledCompositeLCA the problem can be solved.
Comment 1 Christian Janz CLA 2008-05-13 04:59:32 EDT
Created attachment 99905 [details]
ScrollCompositeLCA patch
Comment 2 Ivan Furnadjiev CLA 2009-09-22 07:47:37 EDT
Applied patch in CVS HEAD. Thank you, Christian.