Cant set button name in wxBitmapButton()
Vadim Zeitlin
vadim at wxwindows.org
Fri Mar 23 14:47:31 PDT 2007
On Fri, 23 Mar 2007 22:35:00 +0100 "Michael M." <michael at mustun.ch> wrote:
MM> Cant set button name in wxBitmapButton()
MM>
MM> xx = new wxBitmapButton( this /*panel*/,
MM> wxID_HIGHEST + 1000 + n,
MM> bitmap,
MM> wxDefaultPosition,
MM> wxDefaultSize,
MM> wxBU_AUTODRAW | wxNO_BORDER,
MM> wxDefaultValidator,
MM> /*global_execName.Item(n)*/ "GUGU.2" );
MM>
MM> cerr << "Name of Button: " << xx->GetLabel() << endl;
MM>
MM> Strange: The name is not set. The name should be "GUGU.2" ?
Name is not the same as label. Name is an internal property of the control
and is currently hardly used at all. The label is what the control displays
on screen. Except that wxBitmapButton doesn't actually display any label
neither because it displays a bitmap. But to set label of e.g. a button you
can use SetLabel().
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
More information about the wx-users
mailing list