+void wxGenericDirCtrl::SelectPath(const wxString& path, bool select)
+{
+ bool done = false;
+ wxTreeItemId id = FindChild(m_rootId, path, done);
+ wxTreeItemId lastId = id; // The last non-zero id
+ while ( id.IsOk() && !done )
+ {
+ id = FindChild(id, path, done);
+ if ( id.IsOk() )
+ lastId = id;
+ }
+ if ( !lastId.IsOk() )
+ return;
+
+ if ( done )
+ {
+ m_treeCtrl->SelectItem(id, select);
+ }
+}
+
+void wxGenericDirCtrl::SelectPaths(const wxArrayString& paths)
+{
+ if ( HasFlag(wxDIRCTRL_MULTIPLE) )
+ {
+ UnselectAll();
+ for ( unsigned n = 0; n < paths.size(); n++ )
+ {
+ SelectPath(paths[n]);
+ }
+ }
+}
+
+void wxGenericDirCtrl::UnselectAll()
+{
+ m_treeCtrl->UnselectAll();
+}
+