]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
adaptions to m_peer methods
[wxWidgets.git] / src / generic / treectlg.cpp
index 5dede2bf17856cab073f40d92c85cc865244dfe4..2883e57b14994efd299b8febd30038635ed38798 100644 (file)
@@ -791,9 +791,10 @@ bool wxGenericTreeCtrl::Create(wxWindow *parent,
 #endif
 
     wxVisualAttributes attr = GetDefaultAttributes();
-    SetDefaultForegroundColour( attr.colFg );
-    SetDefaultBackgroundColour( attr.colBg );
-    SetDefaultFont(attr.font);
+    SetOwnForegroundColour( attr.colFg );
+    SetOwnBackgroundColour( attr.colBg );
+    if (!m_hasFont)
+        SetOwnFont(attr.font);
 
 //  m_dottedPen = wxPen( "grey", 0, wxDOT );  too slow under XFree86
     m_dottedPen = wxPen( wxT("grey"), 0, 0 );
@@ -2768,9 +2769,9 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event )
                   (keyCode >= 'A' && keyCode <= 'Z' )))
             {
                 // find the next item starting with the given prefix
-                char ch = (char)keyCode;
+                wxChar ch = (wxChar)keyCode;
 
-                wxTreeItemId id = FindItem(m_current, m_findPrefix + (wxChar)ch);
+                wxTreeItemId id = FindItem(m_current, m_findPrefix + ch);
                 if ( !id.IsOk() )
                 {
                     // no such item