Update from Frank with fixes for running on wxMSW 2.7

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2006-09-07 17:14:57 +00:00
parent 9cf7a6c06b
commit 49e0b673c3

View File

@@ -37,8 +37,8 @@ workaround.
Author: Frank Niessink <frank@niessink.com> Author: Frank Niessink <frank@niessink.com>
Copyright 2006, Frank Niessink Copyright 2006, Frank Niessink
License: wxWidgets license License: wxWidgets license
Version: 0.8 Version: 0.9
Date: August 21, 2006 Date: September 6, 2006
""" """
import wx import wx
@@ -150,7 +150,7 @@ class IterableTreeCtrl(wx.TreeCtrl):
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
class BasePopupFrame(wx.MiniFrame): class BasePopupFrame(wx.Frame):
""" """
BasePopupFrame is the base class for platform specific BasePopupFrame is the base class for platform specific
versions of the PopupFrame. The PopupFrame is the frame that versions of the PopupFrame. The PopupFrame is the frame that
@@ -450,6 +450,9 @@ class BaseComboTreeBox(object):
item = self.FindClientData(clientData) item = self.FindClientData(clientData)
if item: if item:
self._tree.SelectItem(item) self._tree.SelectItem(item)
string = self._tree.GetItemText(item)
if self._text.GetValue() != string:
self._text.SetValue(string)
return True return True
else: else:
return False return False
@@ -718,6 +721,8 @@ class MSWComboTreeBox(NativeComboTreeBox):
return events return events
def OnSelectionChangedInTree(self, event): def OnSelectionChangedInTree(self, event):
if self.IsBeingDeleted():
return
item = event.GetItem() item = event.GetItem()
if item: if item:
selectedValue = self._tree.GetItemText(item) selectedValue = self._tree.GetItemText(item)