Transforming GUI elements outside constructor?

I have some absolute positions for DirectScrolledFrame elements and I don’t know how to set them.

“verticalScroll_incButton_pos” works in constructor, but not

frame['verticalScroll_incButton_pos']

Try:

frame.verticalScroll.incButton['pos']

Thanks. I think I understand how the more complex GUI classes store their individual components now.

Although I can just use setPos(), I get this error when I try assigning the position the dictionary way.

frame.verticalScroll.incButton['pos'] = (0,0,0)
Cannot configure initialisation option "pos" for DirectButton

Ah, you’re right. The [‘pos’] attribute is meant to be changed via setPos(), not by direct assignment.

David

Okay.
But why?

Honestly, I’m not entirely sure. The person who originally developed the DirectGui interface was largely inspired by the Python Mega-Widgets interface, which makes heavy use of this kind of assignment to properties. He was going for that same interface across-the-board in DiretGui, but I suspect he ran into some technical restrictions that forced a few exceptions here and there.

So, the resulting DirectGui interface is what it is. Several people over the years have taken stabs at providing an alternate gui; and we’ll be providing libRocket as part of the official build with 1.8.0.

David