Ed Leafe wrote:
> On Jan 1, 2011, at 11:37 PM, OKB (not okblacke) wrote:
>
>> Looks like it's working fine. It doesn't seem to size
>> itself
>> properly by default, but if I use callAfterInterval to call the
>> scale() method it adopts the right size. Thanks a lot!
>
>
> Can you be more specific about the sizing issue? How are you
> creating it? Are you setting the Source at creation, or
> afterwards? Does it always start at the same size, even with
> differently-sized content?
I just did this in my panel's afterInit:
self.media = dabo.ui.dMediaControl(self, Source="DSCF0086-2.AVI",
ShowControls=True)
self.Sizer.append(self.media, halign="center", border=100)
If I do that, the control doesn't actually show up at all. It's
there in some sense, though, because if I set up a button to call the
control's play() method, I hear the audio playing, even though no video
frame appears.
I managed to avoid using callAfterInterval by instead binding the
MediaControl's EVT_MEDIA_LOADED event to a method that just runs the
form's Sizer.Layout(). I suspect what's going on is that the
MediaControl doesn't know how big to make itself until it loads its
movie, but the sizer is laying itself out before the movie has finished
loading. Binding this event forces the sizer to reformat itself after
the MediaControl has figured out its size.
--
--OKB (not okblacke)
Brendan Barnwell
"Do not follow where the path may lead. Go, instead, where there is
no path, and leave a trail."
--author unknown
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]