Added wx.DROP_ICON()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -88,6 +88,21 @@ public:
|
||||
};
|
||||
|
||||
|
||||
%pythoncode {
|
||||
def DROP_ICON(filename):
|
||||
"""
|
||||
Returns either a `wx.Cursor` or `wx.Icon` created from the image file
|
||||
``filename``. This function is useful with the `wx.DropSource` class
|
||||
which, depending on platform accepts either a icon or a cursor.
|
||||
"""
|
||||
img = wx.Image(filename)
|
||||
if wx.Platform == '__WXGTK__':
|
||||
return wx.IconFromBitmap(wx.BitmapFromImage(img))
|
||||
else:
|
||||
return wx.CursorFromImage(img)
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// wxDropTarget should be associated with a window if it wants to be able to
|
||||
|
Reference in New Issue
Block a user