Using how do I customize my splitLayoutPanel slider bars with buttons?

51 views
Skip to first unread message

DemiSheep

unread,
Sep 14, 2011, 1:55:46 PM9/14/11
to Google Web Toolkit
I am using the splitLayoutPanel in my widget design. I have two slider
bars from the splitLayoutPanel, one vertical and one horizontal. I
want to modify the horizontal bar by adding the following buttons:

"UP" causes the slider bar to jump to the maximum top are of the
window, so you don't have to slide it. "DOWN" Opposite of "UP". "New
Note" Create a new note which will appear in the bottom half of the
horizontally split area.

So I need to make the horizontal split bar wide enough for the buttons
and I need to add the bottons onto it. How do I go about doing this?

geert3

unread,
Sep 15, 2011, 10:56:27 AM9/15/11
to google-we...@googlegroups.com
afaik the slider bar is not customizable so you either have to draw everything yourselves, or add your buttons somewhere else. You may be able to place div's on top of the scrollbar but it will be ugly and likely not cross-browser compatible.
Drawing the scrollbar yourselves is a lot of work but not impossible. For instance you take a ScrollPanel and set overflow=hidden, then draw your own little scrollbar in a bordering panel (e.g. one div and play with margin-top/margin-bottom and background-color to make it appear like a scrollbar), attach mouse events to detect drag etc. You can programmatically setVerticalScrollPosition on the ScrollPanel to make it slide to the desired position.
Reply all
Reply to author
Forward
0 new messages