Re: wxEuphoria v0.11 - wxButton on a child window

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

Matt Lewis wrote:
> 
> Jerry Story wrote:
> > 
> > This is the code.
> > 
> > }}}
<eucode>
> > 
> > constant
> >  frmHtml = create(wxFrame,{Win,-1,"DMAK - documentation"}),
> >  pnlHtml = create(wxPanel,{frmHtml}),
> >  boxHtml = create(wxBoxSizer,{wxVERTICAL}),
> >  btnHtml = create(wxButton,{Win,-1,
> >   "Click here or Press ESC to exit to main; <- -> arrows to navigate."}),
> >  winHtml = create(wxHtmlWindow,{Win,-1,-1,50}) -- This is the main part.
> > 
> > set_sizer(pnlHtml,boxHtml)
> > set_size(btnHtml,win_width,50)
> > set_size(winHtml,win_width,win_height-100)
> > add_window_to_sizer(boxHtml,btnHtml,1,wxGROW,0)
> > add_window_to_sizer(boxHtml,winHtml,1,wxGROW,1)
> > 
> > </eucode>
{{{

> > 
> > What it is supposed to do and what it did on v0.9:
> > It is supposed to make a wide button and a wxHtmlWindow.
> > Both are on a child window.
> > 
> > What it does on v0.11:
> > It makes the wxHtmlWindow, but no button.
> > Instead of a button, there is a space the size and shape of the button and
> > the
> > parent window shows thru the space.
> > 
> > How can I get the button back?
> 
> I'm surprised that this worked in v0.9.  I don't understand the relationships
> you've created here.  I don't know what Win is, but you have the button and
> 
> the wxHtmlWindow with Win as their parents.  But then you add it to a 
> sizer associated with frmHtml.
> 
> I'd say that if you want the html and the button to be on frmHtml, then
> that should be their parent, too.
> 
> Matt

Win is the main wxPanel.

When I change 'Win' (the main wxPanel) to 'pnlHtml' (a wxPanel) like this

btnHtml = create(wxButton,{Win,-1,
winHtml = create(wxHtmlWindow,{Win,-1,-1,50}) -- This is the main part.

btnHtml = create(wxButton,{pnlHtml,-1,
winHtml = create(wxHtmlWindow,{pnlHtml,-1,-1,50}) -- This is the main part.

then nothing happens.

Also when I change to 'frmHtml' (a wxFrame) nothing happens.

btnHtml = create(wxButton,{frmHtml,-1,
winHtml = create(wxHtmlWindow,{frmHtml,-1,-1,50}) -- This is the main part.

Child windows and wxPanels and wxFrames confuse me. I usually fiddle with them
without completely knowing what I'm doing until something works.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu