Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339333 - ScrollBar.setVisible() doesn't work for Tree and Table
Summary: ScrollBar.setVisible() doesn't work for Tree and Table
Status: RESOLVED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.7   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Lakshmi P Shanmugam CLA
QA Contact: Silenio Quarti CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-09 05:46 EST by Lakshmi P Shanmugam CLA
Modified: 2011-03-31 11:01 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lakshmi P Shanmugam CLA 2011-03-09 05:46:17 EST
Happens on Cocoa with 3.7 HEAD.
Comment 1 Felipe Heidrich CLA 2011-03-21 13:42:32 EDT
> ScrollBar.setVisible() doesn't work for Tree and Table 

I believe that is not supposed to work anyway.
Comment 2 Lakshmi P Shanmugam CLA 2011-03-31 07:06:13 EDT
(In reply to comment #1)
> > ScrollBar.setVisible() doesn't work for Tree and Table 
> 
> I believe that is not supposed to work anyway.

Hi Felipe,
But, Table/Tree.getVerticalBar()/getHorizontalBar().setVisible() works on all the platforms except Cocoa. Why is not supposed to work?
Comment 3 Felipe Heidrich CLA 2011-03-31 10:49:47 EDT
(In reply to comment #2)
> Hi Felipe,
> But, Table/Tree.getVerticalBar()/getHorizontalBar().setVisible() works on all
> the platforms except Cocoa. Why is not supposed to work?

Because the scrollbar belongs to the control (table and tree in this case), it is the control's job to configure the scrollbar (max, min, selection, thumb, visibility).
The only way the user should be able to change something in the scrollbar is by using API available in the control.

For example, if the user wants the control to scroll verticall it has to use setTopIndex(), calling getVerticalBar().setSelection() is invalid.

Likewise, if the user does not want the scrollbars to show it has to create the control with SWT.NO_SCROLL.
Comment 4 Felipe Heidrich CLA 2011-03-31 10:59:30 EDT
see Bug 341495

the problem is, if you say  Table/Tree.getVerticalBar()/getHorizontalBar().setVisible()  is supported. Then people will expect all API in Scollbar to be supported also.

Our position is that get* method can be used in a scrollbar for tree/table, but set* can not.

closing as wont fix.
Comment 5 Felipe Heidrich CLA 2011-03-31 11:01:34 EDT
> But, Table/Tree.getVerticalBar()/getHorizontalBar().setVisible() works on all
> the platforms except Cocoa. Why is not supposed to work?

btw, I don't think this is true, if you hide the scrollbar using setVisible(false) it will hide but if you resize the control (or add/remove item) the control will eventually show the scrollbar again.