Hi people,
Can anyone give me an example on how to use DirectFrame?
I hope it can be used to arrange 3 icons (images) and some text.
Later I want to put it in some kind of popup window (maybe a DirectDialog)
Thanks in advance,
srehder
Hi people,
Can anyone give me an example on how to use DirectFrame?
I hope it can be used to arrange 3 icons (images) and some text.
Later I want to put it in some kind of popup window (maybe a DirectDialog)
Thanks in advance,
srehder
No trouble. Just create a DirectLabel for each icon or text item you want to attach to your DirectFrame, and specify the frame as the parent. Then you can position each icon individually.
David
If what you mean by arranging is more like using wxwidgets’ sizer, goto CodeSnippet, there is some code by chombee you can use.
Ah thanks, so I can just use DirectLabelObject.reparentTo(DirectFrameObject) and then the positions specified on the DirectLabelObject will be relative to the DirectFrameObject?
Thats brilliant!
/srehder
Yeah, but it’s easier (and perhaps better) to just specify parent=DirectFrameObject in the constructor.
Great, thanks
I would love to see that code, but can’t find it. Can anyone provide a link?