PDA

View Full Version : Scrollbar Overlap Problems


Gimp
11-23-2013, 01:53 PM
So I'm having this problem with my scrollbar where the content in my listbox is running ontop of my scrollbars.

http://i.imgur.com/zSXZZVQ.jpg

Is there a way to force the scrollbars to the top?

Thanks,
Gimp

Garan
11-23-2013, 02:21 PM
While you could use the ZOrder to force them to the top that is not really the best solution. The simplest thing is to make the scrollbars a child of the control that contains the listbox and position them outside of the listbox. That is, if you have a control like windowBackground that contains a control listbox1, then for your vertical scrollbar, you would create a scrollbar and set the parent to windowBackground, height to the height of listbox1, top to the top of listbox1 and left to the width of listbox1.

NOTE, there used to be a bug that caused bound scrollbars to display incorrectly if the control that they were bound to and the scrollbar itself were both direct children of a window so we had to create container controls to avoid this. I do not know if this condition still exists.

Gimp
11-23-2013, 02:47 PM
Sweet, setting them as child to the window and putting them outside the listbox worked.

Thank you Garan!


http://i.imgur.com/GgPZfQ0.jpg