Issues with scrollbars for DirectScrollFrame

I’m using DirectScrollFrame. The canvas size is slightly longer than the frame size - the idea is so the frame can hold a long list (i.e. imagine something like a shopping list) that the user can scroll through.

I’ve got the frames setup so there’s only the vertical scroll bar. The only problem is… the vertical scroll bar is really big, and I can’t figure out a way to make it smaller.

Here is a picture of what I have:

I can’t seem to find a way to make the scroll bars more narrow.

As you can see, the scroll bar itself is about 1/7th the size of my frame. Ideally I want the scroll bar about half as thick as that.

I’ve tried to use “verticalScroll_frameSize=[a, b, c, d]” and played around with the variables here but all i seem to be able to do is make the scroll bar massive, can’t seem to shrink it.

I’ve tried setting the scaling of the thumb, incbutton, decbutton of the scrollbar itself but that seems to do nothing.

Is there anyway to get the scroll bar to look thinner and less obtrusive?

Also, is it possible to have the scroll bar appear to the left of my frame? Is there a way to set this? [/img]

Use scrollBarWidth = 0.04.

If you want the scroll bar to appear on the left, you have to set manageScrollBars = False, and then use horizontalScroll_pos = (x, y, z) to the desired position.


Thanks drwr.

Do you have any suggestions on where new panda3d users can learn this kind of stuff?

I’ve looked in the manual, the pages for DirectScrolledFrame/etc. don’t go into enough detail.

The API reference doesn’t seem to be complete either. I had a look at that earlier today. Also, I went back there now (Documentation --> Python API Reference), and tried to search for “scrollBarWidth” and it came up with nothing :S

We welcome user contributions to the manual. See this thread for instructions to edit the manual. :slight_smile:

As for where to find this sort of information when the manual is lacking, well, I looked in the source code to answer this question, in You’ll find much of Panda’s source code is quite readable. :slight_smile: