I downloaded the example and tried to execute it getting this error:
$ python CustomCheckBoxDemo.py
Traceback (most recent call last):
File "CustomCheckBoxDemo.py", line 251, in ?
main()
File "CustomCheckBoxDemo.py", line 244, in main
size=(600, 400))
File "CustomCheckBoxDemo.py", line 68, in __init__
self.ccb1 = CCB.CustomCheckBox(self.mainPanel, -1, "Hello wxPython!")
File "/home/r2d2/Desktop/customwx/CustomCheckBox.py", line 111, in __init__
self.SetInitialSize(size)
AttributeError: 'CustomCheckBox' object has no attribute 'SetInitialSize'
After commenting out this line (111 on customcheckbox.py) it works
# self.SetInitialSize(size)
This is my system: debian with python 2.4.4 and wx-2.6-gtk2-unicode
I downloaded the example and tried to execute it getting this error:
$ python CustomCheckBoxDemo.py
Traceback (most recent call last):
File "CustomCheckBoxDemo.py", line 251, in ?
main()
File "CustomCheckBoxDemo.py", line 244, in main
size=(600, 400))
File "CustomCheckBoxDemo.py", line 68, in __init__
self.ccb1 = CCB.CustomCheckBox(self.mainPanel, -1,
"Hello wxPython!")
File "/home/r2d2/Desktop/customwx/CustomCheckBox.py", line
111, in __init__
self.SetInitialSize(size)
AttributeError: 'CustomCheckBox' object has no attribute
'SetInitialSize'
After commenting out this line (111 on customcheckbox.py) it
works # self.SetInitialSize(size)
This is my system: debian with python 2.4.4 and wx-2.6-gtk2-unicode
I believe the problem is the wxPython version: SetInitialSize was introduced somewhere between 2.7 and 2.8 (I don't remember), so it won't work with 2.6. However, for your wxPython version, it should be enough to use the old equivalent of SetInitialSize:
SetInitialSize -->SetBestFittingSize
HTH.
Andrea.
···
_________________________________________
Andrea Gavana (gavana@kpo.kz)
Reservoir Engineer
KPDL
4, Millbank
SW1P 3JA London