Re: [wxEuphoria] how put Media control into a window?

new topic     » goto parent     » topic index » view thread      » older message » newer message
DanM said...

ok, that seems to work, but the added button at the bottom SHRINKS the Media control, and if I add another test button, at the top, it shrinks the Media control again. I guess this is because everything is being crammed into the set size of the top window? Is there some way to auto-magically cause that window to itself expand as controls are added, so the Media control keeps its set size, or do I have to get their sizes and reset the main window size?

It requires a slight change in the way it's added to the sizer. Also, you'll want to put in the actual size that you want:

include wxeud.e   
without warning   
   
constant   
main = create( wxFrame, {0, -1, "Media Demo"}),   
win    = create( wxPanel, main),    
player = create( wxMediaCtrl, {win,-1,"",-1,-1,300,100} ),  
button = create( wxButton, {win, -1, "Click Me"}),  
sizer  = create( wxBoxSizer, wxVERTICAL )  
  
add_window_to_sizer( sizer, player, 0, 0, 0 )  
add_window_to_sizer( sizer, button, 0, 0, 0 )  
set_sizer( win, sizer)  
  
wxMain( main )  

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu