implement wxTreeCtrl::GetFocusedItem() for wxMSW too (see #10859)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
48889bca6f
commit
3c01c59511
@ -127,6 +127,7 @@ public:
|
||||
virtual wxTreeItemId GetRootItem() const;
|
||||
virtual wxTreeItemId GetSelection() const;
|
||||
virtual size_t GetSelections(wxArrayTreeItemIds& selections) const;
|
||||
virtual wxTreeItemId GetFocusedItem() const;
|
||||
|
||||
virtual wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
|
||||
virtual wxTreeItemId GetFirstChild(const wxTreeItemId& item,
|
||||
|
@ -1354,6 +1354,11 @@ wxTreeItemId wxTreeCtrl::GetSelection() const
|
||||
wxCHECK_MSG( !HasFlag(wxTR_MULTIPLE), wxTreeItemId(),
|
||||
wxT("this only works with single selection controls") );
|
||||
|
||||
return GetFocusedItem();
|
||||
}
|
||||
|
||||
wxTreeItemId wxTreeCtrl::GetFocusedItem() const
|
||||
{
|
||||
return wxTreeItemId(TreeView_GetSelection(GetHwnd()));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user