I want to use wx.BitmapFromBuffer control in a wxFrame, but xrced does
not provide this control button. It has a icon "Unknown control" which
may be the way. Could you give me some examples for dealing with
custon control in xrc? Or, simply create the custom control in python
code rathar than xrc file. I need some clue.
I want to use wx.BitmapFromBuffer control in a wxFrame, but xrced does
not provide this control button. It has a icon "Unknown control" which
may be the way. Could you give me some examples for dealing with
custon control in xrc? Or, simply create the custom control in python
code rathar than xrc file. I need some clue.
I want to use wx.BitmapFromBuffer control in a wxFrame, but xrced does
not provide this control button. It has a icon "Unknown control" which
may be the way. Could you give me some examples for dealing with
custon control in xrc? Or, simply create the custom control in python
code rathar than xrc file. I need some clue.
Also look at http://wiki.wxpython.org/index.cgi/XRCed#custom (this is new stuff in 2.8.3). It supports "plugging in" controls that will show up as items in the "Custom" section of the right click menu. Play with the examples given in the links at the bottom of the page (you may have to fiddle a bit with them to get them to work).
That said, it looks like BitmapFromBuffer isn't a control, it's a function that returns a bitmap. Maybe you want to create a custom control (CreatingCustomControls - wxPyWiki) that would incorporate the bitmap, then use the above to get XRCed to recognize it?
I want to use wx.BitmapFromBuffer control in a wxFrame, but xrced does
not provide this control button.
wx.BitmapFromBuffer is not a control, it is just a factory function for creating a wx.Bitmap from a block of data bytes. What you are probably looking for is a wx.StaticBitmap or perhaps a wx.BitmapButton, which are standard widgets with XRC support. Both of them will allow you to change the bitmap later if you need to.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!