A new widgets, composition of other widgets

Vadim Zeitlin vadim at wxwindows.org
Sat Dec 30 10:51:08 PST 2006


On Sat, 30 Dec 2006 12:30:27 +0000 (UTC) Mauro <mauro.ziliani at ngi.it> wrote:

M>   wxStaticText *euro = new wxStaticText(this, nid++, _T("---.--"));
M>   box->Add(2, wxALL | wxEXPAND, 5);
M> 
M>   wxStaticText *sem = new wxStaticText(this, nid++, _T("R|V"));
M>   box->Add(2, wxALL | wxEXPAND, 5);
M> 
M>   wxStaticText *pagato = new wxStaticText(this, nid++, _T("P"));
M>   box->Add(1, wxALL | wxEXPAND, 5);
M> 
M>   wxButton *cash = new wxButton(this, nid++, _T("CASH"));
M>   box->Add(2, wxALL | wxEXPAND, 5);
M> 
M>   wxStaticText *connect = new wxStaticText(this, nid++, _T("C|NC"));
M>   box->Add(1, wxALL | wxEXPAND, 5);

 It's really unfortunate that the above code compilers because this is
absolutely not what you wanted to do: notice that you didn't add any of the
controls created above to the sizer.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list