but logically it's a const table with the following entries:
=
{
- { wxEVT_COMMAND_TREE_ITEM_COLLAPSED, wxEVT_COMMAND_TREE_ITEM_COLLAPSING },
- { wxEVT_COMMAND_TREE_ITEM_EXPANDED, wxEVT_COMMAND_TREE_ITEM_EXPANDING }
+ { wxEVT_TREE_ITEM_COLLAPSED, wxEVT_TREE_ITEM_COLLAPSING },
+ { wxEVT_TREE_ITEM_EXPANDED, wxEVT_TREE_ITEM_EXPANDING }
};
*/
// initialize the global array of events now as it can't be done statically
// with the wxEVT_XXX values being allocated during run-time only
- gs_expandEvents[IDX_COLLAPSE][IDX_DONE] = wxEVT_COMMAND_TREE_ITEM_COLLAPSED;
- gs_expandEvents[IDX_COLLAPSE][IDX_DOING] = wxEVT_COMMAND_TREE_ITEM_COLLAPSING;
- gs_expandEvents[IDX_EXPAND][IDX_DONE] = wxEVT_COMMAND_TREE_ITEM_EXPANDED;
- gs_expandEvents[IDX_EXPAND][IDX_DOING] = wxEVT_COMMAND_TREE_ITEM_EXPANDING;
+ gs_expandEvents[IDX_COLLAPSE][IDX_DONE] = wxEVT_TREE_ITEM_COLLAPSED;
+ gs_expandEvents[IDX_COLLAPSE][IDX_DOING] = wxEVT_TREE_ITEM_COLLAPSING;
+ gs_expandEvents[IDX_EXPAND][IDX_DONE] = wxEVT_TREE_ITEM_EXPANDED;
+ gs_expandEvents[IDX_EXPAND][IDX_DOING] = wxEVT_TREE_ITEM_EXPANDING;
}
bool wxTreeCtrl::Create(wxWindow *parent,
if ( next.IsOk() )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, next);
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next);
if ( IsTreeEventAllowed(changingEvent) )
{
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this, next);
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next);
(void)HandleTreeEvent(changedEvent);
}
else
if ( IsExpanded(item) )
{
- wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING,
+ wxTreeEvent event(wxEVT_TREE_ITEM_COLLAPSING,
this, wxTreeItemId(item));
if ( !IsTreeEventAllowed(event) )
if ( IsExpanded(item) )
return;
- wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSED, this, item);
+ wxTreeEvent event(wxEVT_TREE_ITEM_COLLAPSED, this, item);
(void)HandleTreeEvent(event);
}
//else: change didn't took place, so do nothing at all
if ( HasFlag(wxTR_MULTIPLE) )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, wxTreeItemId());
changingEvent.m_itemOld = htFocus;
{
ClearFocusedItem();
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, wxTreeItemId());
changedEvent.m_itemOld = htFocus;
(void)HandleTreeEvent(changedEvent);
HTREEITEM htFocus = (HTREEITEM)TreeView_GetSelection(GetHwnd());
if ( !htFocus ) return;
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this);
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this);
changingEvent.m_itemOld = htFocus;
if ( IsTreeEventAllowed(changingEvent) )
{
DoUnselectAll();
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this);
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this);
changedEvent.m_itemOld = htFocus;
(void)HandleTreeEvent(changedEvent);
}
HTREEITEM htFocus = (HTREEITEM)TreeView_GetSelection(GetHwnd());
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this);
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this);
changingEvent.m_itemOld = htFocus;
if ( IsTreeEventAllowed(changingEvent) )
{
DoSelectChildren(parent);
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this);
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this);
changedEvent.m_itemOld = htFocus;
(void)HandleTreeEvent(changedEvent);
}
if ( HasFlag(wxTR_MULTIPLE) )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item);
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, item);
if ( IsTreeEventAllowed(changingEvent) )
{
SetFocusedItem(item);
}
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, item);
(void)HandleTreeEvent(changedEvent);
}
// not so send the events ourselves and ignore those generated by
// TreeView_SelectItem() if m_changingSelection is set.
wxTreeEvent
- changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, itemNew);
+ changingEvent(wxEVT_TREE_SEL_CHANGING, this, itemNew);
changingEvent.SetOldItem(itemOld);
if ( IsTreeEventAllowed(changingEvent) )
{
::SetFocus(GetHwnd(), HITEM(item));
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, itemNew);
changedEvent.SetOldItem(itemOld);
(void)HandleTreeEvent(changedEvent);
// conjunction with modifiers
if ( (msg->wParam == VK_RETURN) && !wxIsAnyModifierDown() )
{
- // we need VK_RETURN to generate wxEVT_COMMAND_TREE_ITEM_ACTIVATED
+ // we need VK_RETURN to generate wxEVT_TREE_ITEM_ACTIVATED
return false;
}
}
if ( cmd == EN_UPDATE )
{
- wxCommandEvent event(wxEVT_COMMAND_TEXT_UPDATED, id);
+ wxCommandEvent event(wxEVT_TEXT, id);
event.SetEventObject( this );
ProcessCommand(event);
}
if ( vkey != VK_RETURN && bCtrl )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, htSel);
changingEvent.m_itemOld = htSel;
{
DoToggleItemSelection(wxTreeItemId(htSel));
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, htSel);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
if ( count != 1 || HITEM(selections[0]) != htSel )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, htSel);
changingEvent.m_itemOld = htSel;
DoUnselectAll();
DoSelectItem(wxTreeItemId(htSel));
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, htSel);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
break;
}
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, next);
changingEvent.m_itemOld = htSel;
DoSelectItem(next);
SetFocusedItem(next);
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, next);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
if ( bShift && SelectRange(GetHwnd(), HITEM(m_htSelStart), HITEM(next),
SR_UNSELECT_OTHERS | SR_SIMULATE) )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, next);
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next);
changingEvent.m_itemOld = htSel;
if ( IsTreeEventAllowed(changingEvent) )
SelectRange(GetHwnd(), HITEM(m_htSelStart), HITEM(next),
SR_UNSELECT_OTHERS);
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this, next);
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
}
if ( next.IsOk() && !IsHiddenRoot(next) )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, next);
changingEvent.m_itemOld = htSel;
DoSelectItem(next);
SetFocusedItem(next);
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, next);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
{
wxTreeItemId next = TreeView_GetChild(GetHwnd(), htSel);
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING, this, next);
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING, this, next);
changingEvent.m_itemOld = htSel;
if ( IsTreeEventAllowed(changingEvent) )
DoSelectItem(next);
SetFocusedItem(next);
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED, this, next);
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED, this, next);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
}
HITEM(m_htSelStart), HITEM(next),
SR_UNSELECT_OTHERS | SR_SIMULATE) )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, next);
changingEvent.m_itemOld = htSel;
SR_UNSELECT_OTHERS);
SetFocusedItem(next);
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, next);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
}
else // no Shift
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, next);
changingEvent.m_itemOld = htSel;
DoSelectItem(next);
SetFocusedItem(next);
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, next);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
next = nextTemp;
}
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, next);
changingEvent.m_itemOld = htSel;
DoSelectItem(next);
SetFocusedItem(next);
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, next);
changedEvent.m_itemOld = htSel;
(void)HandleTreeEvent(changedEvent);
bool wxTreeCtrl::MSWHandleTreeKeyDownEvent(WXWPARAM wParam, WXLPARAM lParam)
{
- wxTreeEvent keyEvent(wxEVT_COMMAND_TREE_KEY_DOWN, this);
+ wxTreeEvent keyEvent(wxEVT_TREE_KEY_DOWN, this);
keyEvent.m_evtKey = CreateKeyEvent(wxEVT_KEY_DOWN, wParam, lParam);
bool processed = HandleTreeEvent(keyEvent);
const HTREEITEM htSel = (HTREEITEM)TreeView_GetSelection(GetHwnd());
if ( htSel )
{
- wxTreeEvent activatedEvent(wxEVT_COMMAND_TREE_ITEM_ACTIVATED,
+ wxTreeEvent activatedEvent(wxEVT_TREE_ITEM_ACTIVATED,
this, htSel);
(void)HandleTreeEvent(activatedEvent);
}
// create the event
if ( item.IsOk() )
{
- wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_MENU, this, item);
+ wxTreeEvent event(wxEVT_TREE_ITEM_MENU, this, item);
event.m_pointDrag = pt;
break;
}
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, htItem);
changingEvent.m_itemOld = htOldItem;
// reset on any click without Shift
m_htSelStart.Unset();
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, htItem);
changedEvent.m_itemOld = htOldItem;
(void)HandleTreeEvent(changedEvent);
if ( willChange )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, htItem);
changingEvent.m_itemOld = htOldItem;
SetFocusedItem(wxTreeItemId(htItem));
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, htItem);
changedEvent.m_itemOld = htOldItem;
(void)HandleTreeEvent(changedEvent);
// multiple drag and drop to work.
if ( !IsItemSelected(GetHwnd(), htItem))
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, htItem);
changingEvent.m_itemOld = htOldItem;
DoSelectItem(wxTreeItemId(htItem));
SetFocusedItem(wxTreeItemId(htItem));
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, htItem);
changedEvent.m_itemOld = htOldItem;
(void)HandleTreeEvent(changedEvent);
// click if needed
if ( processed )
{
- int htFlags = 0;
- wxTreeItemId item = HitTest(wxPoint(x, y), htFlags);
-
- if ( htFlags & wxTREE_HITTEST_ONITEMSTATEICON )
+ if ( tvht.flags & TVHT_ONITEMSTATEICON )
{
m_triggerStateImageClick = true;
}
// confusing, so override this default behaviour
if ( !IsItemSelected(GetHwnd(), htItem) )
{
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, htItem);
changingEvent.m_itemOld = htOldItem;
DoSelectItem(wxTreeItemId(htItem));
SetFocusedItem(wxTreeItemId(htItem));
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, htItem);
changedEvent.m_itemOld = htOldItem;
(void)HandleTreeEvent(changedEvent);
{
m_mouseUpDeselect = false;
- wxTreeEvent changingEvent(wxEVT_COMMAND_TREE_SEL_CHANGING,
+ wxTreeEvent changingEvent(wxEVT_TREE_SEL_CHANGING,
this, htItem);
changingEvent.m_itemOld = htOldItem;
DoSelectItem(wxTreeItemId(htItem));
SetFocusedItem(wxTreeItemId(htItem));
- wxTreeEvent changedEvent(wxEVT_COMMAND_TREE_SEL_CHANGED,
+ wxTreeEvent changedEvent(wxEVT_TREE_SEL_CHANGED,
this, htItem);
changedEvent.m_itemOld = htOldItem;
(void)HandleTreeEvent(changedEvent);
{
if ( tvht.flags & TVHT_ONITEMSTATEICON )
{
- wxTreeEvent event(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK,
+ wxTreeEvent event(wxEVT_TREE_STATE_IMAGE_CLICK,
this, htItem);
(void)HandleTreeEvent(event);
wxDELETE(m_dragImage);
// generate the drag end event
- wxTreeEvent event(wxEVT_COMMAND_TREE_END_DRAG,
+ wxTreeEvent event(wxEVT_TREE_END_DRAG,
this, htItem);
event.m_pointDrag = wxPoint(x, y);
(void)HandleTreeEvent(event);
switch ( hdr->code )
{
case TVN_BEGINDRAG:
- eventType = wxEVT_COMMAND_TREE_BEGIN_DRAG;
+ eventType = wxEVT_TREE_BEGIN_DRAG;
// fall through
case TVN_BEGINRDRAG:
{
if ( eventType == wxEVT_NULL )
- eventType = wxEVT_COMMAND_TREE_BEGIN_RDRAG;
+ eventType = wxEVT_TREE_BEGIN_RDRAG;
//else: left drag, already set above
NM_TREEVIEW *tv = (NM_TREEVIEW *)lParam;
case TVN_BEGINLABELEDIT:
{
- eventType = wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT;
+ eventType = wxEVT_TREE_BEGIN_LABEL_EDIT;
TV_DISPINFO *info = (TV_DISPINFO *)lParam;
// although the user event handler may still veto it, it is
case TVN_DELETEITEM:
{
- eventType = wxEVT_COMMAND_TREE_DELETE_ITEM;
+ eventType = wxEVT_TREE_DELETE_ITEM;
NM_TREEVIEW *tv = (NM_TREEVIEW *)lParam;
event.m_item = tv->itemOld.hItem;
case TVN_ENDLABELEDIT:
{
- eventType = wxEVT_COMMAND_TREE_END_LABEL_EDIT;
+ eventType = wxEVT_TREE_END_LABEL_EDIT;
TV_DISPINFO *info = (TV_DISPINFO *)lParam;
event.m_item = info->item.hItem;
#ifdef TVN_GETINFOTIP
case TVN_GETINFOTIP:
{
- eventType = wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP;
+ eventType = wxEVT_TREE_ITEM_GETTOOLTIP;
NMTVGETINFOTIP *info = (NMTVGETINFOTIP*)lParam;
// Which item are we trying to get a tooltip for?
#endif // !__WXWINCE__
case TVN_GETDISPINFO:
- eventType = wxEVT_COMMAND_TREE_GET_INFO;
+ eventType = wxEVT_TREE_GET_INFO;
// fall through
case TVN_SETDISPINFO:
{
if ( eventType == wxEVT_NULL )
- eventType = wxEVT_COMMAND_TREE_SET_INFO;
+ eventType = wxEVT_TREE_SET_INFO;
//else: get, already set above
TV_DISPINFO *info = (TV_DISPINFO *)lParam;
case TVN_SELCHANGEDW:
if ( !m_changingSelection )
{
- eventType = wxEVT_COMMAND_TREE_SEL_CHANGED;
+ eventType = wxEVT_TREE_SEL_CHANGED;
}
// fall through
if ( !m_changingSelection )
{
if ( eventType == wxEVT_NULL )
- eventType = wxEVT_COMMAND_TREE_SEL_CHANGING;
+ eventType = wxEVT_TREE_SEL_CHANGING;
//else: already set above
if (hdr->code == TVN_SELCHANGINGW ||
{
wxLoadedDLL dllComCtl32(wxT("comctl32.dll"));
if ( dllComCtl32.IsLoaded() )
+ {
wxDL_INIT_FUNC(s_pfn, ImageList_Copy, dllComCtl32);
+ loaded = true;
+ }
}
if ( !s_pfnImageList_Copy )
if ( htFlags & wxTREE_HITTEST_ONITEMSTATEICON )
{
event.m_item = item;
- eventType = wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK;
+ eventType = wxEVT_TREE_STATE_IMAGE_CLICK;
}
break;
{
event.m_item = tvhti.hItem;
eventType = (int)hdr->code == NM_DBLCLK
- ? wxEVT_COMMAND_TREE_ITEM_ACTIVATED
- : wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK;
+ ? wxEVT_TREE_ITEM_ACTIVATED
+ : wxEVT_TREE_ITEM_RIGHT_CLICK;
event.m_pointDrag.x = tvhti.pt.x;
event.m_pointDrag.y = tvhti.pt.y;
DoSetItem(&tvItem);
}
+// ----------------------------------------------------------------------------
+// Update locking.
+// ----------------------------------------------------------------------------
+
+// Using WM_SETREDRAW with the native control is a bad idea as it's broken in
+// some Windows versions (see http://support.microsoft.com/kb/130611) and
+// doesn't seem to do anything in other ones (e.g. under Windows 7 the tree
+// control keeps updating its scrollbars while the items are added to it,
+// resulting in horrible flicker when adding even a couple of dozen items).
+// So we resize it to the smallest possible size instead of freezing -- this
+// still flickers, but actually not as badly as it would if we didn't do it.
+
+void wxTreeCtrl::DoFreeze()
+{
+ if ( IsShown() )
+ {
+ RECT rc;
+ ::GetWindowRect(GetHwnd(), &rc);
+ m_thawnSize = wxRectFromRECT(rc).GetSize();
+
+ ::SetWindowPos(GetHwnd(), 0, 0, 0, 1, 1,
+ SWP_NOMOVE | SWP_NOZORDER | SWP_NOREDRAW | SWP_NOACTIVATE);
+ }
+}
+
+void wxTreeCtrl::DoThaw()
+{
+ if ( IsShown() )
+ {
+ if ( m_thawnSize != wxDefaultSize )
+ {
+ ::SetWindowPos(GetHwnd(), 0, 0, 0, m_thawnSize.x, m_thawnSize.y,
+ SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
+ }
+ }
+}
+
+// We also need to override DoSetSize() to ensure that m_thawnSize is reset if
+// the window is resized while being frozen -- in this case, we need to avoid
+// resizing it back to its original, pre-freeze, size when it's thawed.
+void wxTreeCtrl::DoSetSize(int x, int y, int width, int height, int sizeFlags)
+{
+ m_thawnSize = wxDefaultSize;
+
+ wxTreeCtrlBase::DoSetSize(x, y, width, height, sizeFlags);
+}
+
#endif // wxUSE_TREECTRL