|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Image buttons
Im working with wxBitmapButton but for some reason the image shows but not as a button ( working under linux ) does anyone knows why?
Code:
wxInitAllImageHandlers( )
img = wxImage('cd.png', wxBITMAP_TYPE_PNG).ConvertToBitmap( )
w = img.GetWidth( )
h = img.GetHeight( )
bnt = wxBitmapButton(self, -1, img, (20, 20), (w, h))
EVT_BUTTON(self, BUTTON_ID, self.OnClick )
I even looked at the demo version that comes witht he demo package but i got alot of errrors.. but i have seen other examples.. and they seem to be the same as what i have on top.. so im kinda confused abit
__________________
IE QUOTE | PHP Manual | Google | C/C++ Compiler | Linux Tutorials | General Stuff Game Dev Last edited by xlordt : July 3rd, 2004 at 11:47 PM. |
|
#2
|
|||
|
|||
|
why don't you try using wxbitmap for creating an image
wxBitmapFromImage(image, depth=-1) this worked fine for me |
|
#3
|
||||
|
||||
|
ya forgot to mention that i got it working.. but i still would like to see an example of the way you do it for future use
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Python Programming > Image buttons |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|