[wxPython-users] wxBitmapButton Problem

Jorgen Bodde jorgen.maillist at gmail.com
Mon Mar 5 04:15:11 PST 2007


It is not good practice to use a relative filename in the constructor of a
wxBitmap. You have not got any control over where the current directory of
your app is pointing to.

Basically use a full path name, check of the bitmap is loaded ok, then
assign it to the wxBitmapButton.

- Jorgen

On 3/5/07, Amit15.Kumar at aricent.com <Amit15.Kumar at aricent.com> wrote:
>
>
> Can anybody tell me whats wrong with this code....
>
> /* trying to display test2.bmp on button bmpBtn*/
>
> bitmap =3D wxBitmap(_T("test2.bmp"), wxBITMAP_TYPE_BMP);
> wxBitmapButton *bmpBtn =3D new wxBitmapButton
>                                  (
>                                   panel, wxID_ANY,
>                                   bitmap ,
>                                   wxPoint(30, 70)
>                                  );
>
> Result:   Button is not being display...
>
>
> thanks
> amit tandial
>
> ***********************  Aricent-Unclassified   ***********************
>
> "DISCLAIMER: This message is proprietary to Aricent and is intended solel=
y for the use of
> the individual to whom it is addressed. It may contain privileged or conf=
idential information and should not be
> circulated or used for any purpose other than for what it is intended. If=
 you have received this message in error,
> please notify the originator immediately. If you are not the intended rec=
ipient, you are notified that you are strictly
> prohibited from using, copying, altering, or disclosing the contents of t=
his message. Aricent accepts no responsibility for
> loss or damage arising from the use of the information transmitted by thi=
s email including damage from virus."
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200703=
05/a3657ef4/attachment.htm


More information about the wxpython-users mailing list