DirectScrolledFrame problem

In the following code, I create a DirectScrolledFrame, and then parent to it a DirectGUI object (in this case another DirectFrame, but can be any GUI object). When I do this, the scrollbar gets hidden: it works but is not visible. What is wrong?

from direct.gui.DirectGui import *
from direct.showbase.ShowBase import ShowBase
from panda3d.core import AntialiasAttrib, Vec4

class  Sfc(ShowBase):

	def __init__(self):
		# Dimension the DirectScrolledFrame
		fS = (-0.8,0.8,-0.8,0.8)
		fC = (fS[0], fS[1]-0.05, 0, 5)
		scrollWindow = DirectScrolledFrame( parent = base.aspect2d, frameSize = fS,
									canvasSize = fC, scrollBarWidth = 0.04
		canvas = scrollWindow.getCanvas()

		DirectFrame( parent = canvas, 
					frameColor = (0,0,1,1),
					frameSize  = (fC[0]+0.1, fC[1]-0.5, fC[2]+0.1,fC[3]-0.1)

sfc = Sfc()

Using Panda 1.9 on Ubuntu 14.04 - 64 bits

Could you be experiencing this bug?

I seem to recall that said bug did indeed include the scrollbar disappearing, so it seems very likely that this issue comes from that same bug.

Indeed. I took the test code of this other topic, made the canvas large enough so that you need to scroll down in order for the button to appear. When the button in the canvas becomes visible, the two buttons at the corners get cutted AND the scrollbar disappears.

Ok so I see you already made a fix! I am using the deb package from the download page, but I guess I will need to download from the git repository and build on my machine.

Cheers! and thanks!

Ok I downloaded the code from github and compiled it. It gave a long list of warning (see below), but I could open run python files. Now the above code crashes (Segmentation fault). The code of the other thread, with the two buttons also crashes but: if I click on the left button it gives a segmentation fault with no extra info, while if I click on the right button I get:

These crash seem related to DirectScrolledWindow.

The long list of warnings is the following:

Odd, that’s definitely related to something else I’ve been working on. I haven’t been noticing such assertions, though. I’ll try the DirectScrolledFrame code.

As for the dpkg warnings, they indicate a potential issue with your Python installation, but it’s nothing that would impair functionality.

Found the issue and pushed a fix. Sorry for the inconvenience. Let me know if there are any more issues.

It’s perfect! Thanks a lot!