X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/91b8de8dee3e7ae3c4edc0ab0923b84bba20d9c4..79570d64d36dfdf31e20b4242bf664232f20594b:/src/generic/treectrl.cpp diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index 181c65b069..944c984855 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -403,7 +403,9 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, wxScrolledWindow::Create( parent, id, pos, size, style|wxHSCROLL|wxVSCROLL, name ); +#if wxUSE_VALIDATORS SetValidator( validator ); +#endif SetBackgroundColour( *wxWHITE ); m_dottedPen = wxPen( *wxBLACK, 0, 0 ); @@ -957,7 +959,7 @@ bool wxTreeCtrl::TagNextChildren(wxGenericTreeItem *crt_item, wxGenericTreeItem size_t count = children.Count(); for (size_t n=(size_t)(index+1); nSetHilight(select); RefreshLine(crt_item); - if (crt_item==last_item) return true; + if (crt_item==last_item) return TRUE; if (crt_item->HasChildren()) { wxArrayGenericTreeItems& children = crt_item->GetChildren(); size_t count = children.Count(); for ( size_t n = 0; n < count; ++n ) - if (TagAllChildrenUntilLast(children[n], last_item, select)) return true; + if (TagAllChildrenUntilLast(children[n], last_item, select)) return TRUE; } - return false; + return FALSE; } void wxTreeCtrl::SelectItemRange(wxGenericTreeItem *item1, wxGenericTreeItem *item2) @@ -1016,8 +1018,8 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId, // to keep going anyhow !!! if (is_single) { - unselect_others=true; - extended_select=false; + unselect_others=TRUE; + extended_select=FALSE; } wxGenericTreeItem *item = itemId.m_pItem; @@ -1047,7 +1049,7 @@ void wxTreeCtrl::SelectItem(const wxTreeItemId& itemId, } else { - bool select=true; // the default + bool select=TRUE; // the default // Check if we need to toggle hilight (ctrl mode) if (!unselect_others)