Switched to InnoSetup for MSW distributions.
-Added wxToggleButton
+Added wxToggleButton.
+
+Fixed bug that prevented wxTreeCtrl.OnCompareItems from being called.
#---------------------------------------------------------------------------
class MyTreeCtrl(wxTreeCtrl):
- def __init__(self, parent, id, pos, size, style):
+ def __init__(self, parent, id, pos, size, style, log):
wxTreeCtrl.__init__(self, parent, id, pos, size, style)
-
+ self.log = log
def OnCompareItems(self, item1, item2):
t1 = self.GetItemText(item1)
t2 = self.GetItemText(item2)
+ self.log.WriteText('compare: ' + t1 + '<>' + t2 + '\n')
if t1 < t2: return -1
if t1 == t2: return 0
return 1
tID = NewId()
self.tree = MyTreeCtrl(self, tID, wxDefaultPosition, wxDefaultSize,
- wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS)# | wxTR_MULTIPLE)
+ wxTR_HAS_BUTTONS | wxTR_EDIT_LABELS# | wxTR_MULTIPLE
+ , self.log)
#import images
#il = wxImageList(16, 16)
%{
class wxPyTreeCtrl : public wxTreeCtrl {
+ DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl);
public:
wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
char* name) :
wxTreeCtrl(parent, id, pos, size, style, validator, name) {}
-
int OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2) {
int rval = 0;
PYPRIVATE;
};
+IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl);
+
%}
// These are for the GetFirstChild/GetNextChild methods below
};
class wxPyTreeCtrl : public wxTreeCtrl {
+ DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl);
public:
wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
const wxPoint& pos,
char* name) :
wxTreeCtrl(parent, id, pos, size, style, validator, name) {}
-
int OnCompareItems(const wxTreeItemId& item1,
const wxTreeItemId& item2) {
int rval = 0;
PYPRIVATE;
};
+IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl);
+
#ifdef __cplusplus
extern "C" {
#endif