| Summary: | ScrollBar.setVisible() doesn't work for Tree and Table | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Lakshmi P Shanmugam <lshanmug> |
| Component: | SWT | Assignee: | Lakshmi P Shanmugam <lshanmug> |
| Status: | RESOLVED WONTFIX | QA Contact: | Silenio Quarti <Silenio_Quarti> |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse.felipe |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | |||
|
Description
Lakshmi P Shanmugam
> ScrollBar.setVisible() doesn't work for Tree and Table
I believe that is not supposed to work anyway.
(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? (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. 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. > 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.
|