Add wxTreeCtrl::{Clear,Set}FocusedItem().
Allow changing just the currently focused (not selected) item and also removing the focus completely. Closes #11599. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64196 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1953,6 +1953,20 @@ void wxGenericTreeCtrl::Unselect()
|
||||
}
|
||||
}
|
||||
|
||||
void wxGenericTreeCtrl::ClearFocusedItem()
|
||||
{
|
||||
wxTreeItemId item = GetFocusedItem();
|
||||
if ( item.IsOk() )
|
||||
SelectItem(item, false);
|
||||
}
|
||||
|
||||
void wxGenericTreeCtrl::SetFocusedItem(const wxTreeItemId& item)
|
||||
{
|
||||
wxCHECK_RET( item.IsOk(), wxT("invalid tree item") );
|
||||
|
||||
SelectItem(item, true);
|
||||
}
|
||||
|
||||
void wxGenericTreeCtrl::UnselectAllChildren(wxGenericTreeItem *item)
|
||||
{
|
||||
if (item->IsSelected())
|
||||
|
||||
Reference in New Issue
Block a user