Hi 
Investigating porting my wx 2.8 python app to wx 3.0.2 classic (it’s about time) and run into this hurdle. Apparently the GetItemHeight is not part of CheckListBox class anymore:
bash\basher\patcher_dialog.py:519: wxPyDeprecationWarning: Accessing deprecated property.
mouseItem = (event.m_y/self.gPatchers.GetItemHeight() +
Traceback (most recent call last):
File "bash\basher\patcher_dialog.py", line 519, in OnMouse
mouseItem = (event.m_y/self.gPatchers.GetItemHeight() +
AttributeError: 'CheckListBox' object has no attribute 'GetItemHeight'
People were using them to get the item hovered upon in a mouse event handler (gPatchers below is a wx.CheckListBox
):
def OnMouse(self,event):
if event.Moving():
mouseItem = (event.m_y/self.gPatchers.GetItemHeight() + # blows here
self.gPatchers.GetScrollPos(wx.VERTICAL))
if mouseItem != self.mouseItem:
self.mouseItem = mouseItem
self.MouseEnteredItem(mouseItem)
elif event.Leaving():
self.gTipText.SetLabel(self.defaultTipText)
self.mouseItem = -1
event.Skip()
So how do I achieve this in wx python 3.0.2 ?
(Asked at SO if anyone wants the points: http://stackoverflow.com/q/37788095/281545)
Sorry for double post - problem solved - see SO wx python 3.0.2 classic 'CheckListBox' object has no attribute 'GetItemHeight' - Stack Overflow
Still some insight as to why this was removed/if it is replaced would be welcome 
···
On Tuesday, June 14, 2016 at 2:05:39 AM UTC+2, Mr&Mrs D wrote:
Hi 
Investigating porting my wx 2.8 python app to wx 3.0.2 classic (it’s about time) and run into this hurdle. Apparently the GetItemHeight is not part of CheckListBox class anymore:
bash\basher\patcher_dialog.py:519: wxPyDeprecationWarning: Accessing deprecated property.
mouseItem = (event.m_y/self.gPatchers.GetItemHeight() +
Traceback (most recent call last):
File "bash\basher\patcher_dialog.py", line 519, in OnMouse
mouseItem = (event.m_y/self.gPatchers.GetItemHeight() +
AttributeError: 'CheckListBox' object has no attribute 'GetItemHeight'
People were using them to get the item hovered upon in a mouse event handler (gPatchers below is a wx.CheckListBox
):
def OnMouse(self,event):
if event.Moving():
mouseItem = (event.m_y/self.gPatchers.GetItemHeight() + # blows here
self.gPatchers.GetScrollPos(wx.VERTICAL))
if mouseItem != self.mouseItem:
self.mouseItem = mouseItem
self.MouseEnteredItem(mouseItem)
elif event.Leaving():
self.gTipText.SetLabel(self.defaultTipText)
self.mouseItem = -1
event.Skip()
So how do I achieve this in wx python 3.0.2 ?
(Asked at SO if anyone wants the points: http://stackoverflow.com/q/37788095/281545)