git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2592 
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
 // Name:        checklst.h
 // Purpose:     wxCheckListBox class - a listbox with checkable items
 // Author:      Vadim Zeitlin
 // Name:        checklst.h
 // Purpose:     wxCheckListBox class - a listbox with checkable items
 // Author:      Vadim Zeitlin
 // Created:     16.11.97
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
 // Created:     16.11.97
 // RCS-ID:      $Id$
 // Copyright:   (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
   wxCheckListBox(wxWindow *parent, wxWindowID id,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
   wxCheckListBox(wxWindow *parent, wxWindowID id,
                  const wxPoint& pos = wxDefaultPosition,
                  const wxSize& size = wxDefaultSize,
                  const wxString choices[] = NULL,
                  long style = 0,
                  const wxValidator& validator = wxDefaultValidator,
                  const wxString choices[] = NULL,
                  long style = 0,
                  const wxValidator& validator = wxDefaultValidator,
   virtual void Delete(int n);
   virtual void InsertItems(int nItems, const wxString items[], int pos);
 
   virtual void Delete(int n);
   virtual void InsertItems(int nItems, const wxString items[], int pos);
 
+  virtual bool SetFont( const wxFont &font );
+
   // items may be checked
   bool IsChecked(size_t uiIndex) const;
   void Check(size_t uiIndex, bool bCheck = TRUE);
   // items may be checked
   bool IsChecked(size_t uiIndex) const;
   void Check(size_t uiIndex, bool bCheck = TRUE);
 
   // know that there will always be OnMeasure before OnDraw
 
   // fix appearance
   // know that there will always be OnMeasure before OnDraw
 
   // fix appearance
-  SetFont(wxSystemSettings::GetSystemFont(wxSYS_ANSI_VAR_FONT));
   SetMarginWidth(GetDefaultMarginWidth());
 }
 
   SetMarginWidth(GetDefaultMarginWidth());
 }
 
 
     #ifdef __WIN32__
         RECT rcUpdate;
 
     #ifdef __WIN32__
         RECT rcUpdate;
         if ( ::SendMessage(hwndListbox, LB_GETITEMRECT,
                            m_nIndex, (LPARAM)&rcUpdate) == LB_ERR )
         {
         if ( ::SendMessage(hwndListbox, LB_GETITEMRECT,
                            m_nIndex, (LPARAM)&rcUpdate) == LB_ERR )
         {
     #endif  // Win32/16
 
     InvalidateRect(hwndListbox, &rcUpdate, FALSE);
     #endif  // Win32/16
 
     InvalidateRect(hwndListbox, &rcUpdate, FALSE);
     wxCommandEvent event(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, m_pParent->GetId());
     event.SetInt(m_nIndex);
     event.SetEventObject(m_pParent);
     wxCommandEvent event(wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, m_pParent->GetId());
     event.SetInt(m_nIndex);
     event.SetEventObject(m_pParent);
+
+bool wxCheckListBox::SetFont( const wxFont &font )
+{
+    size_t i;
+    for (i=0; i < m_aItems.GetCount(); i++)
+        m_aItems[i]->SetFont(font);
+    wxListBox::SetFont(font);
+    return TRUE;
+}
+
 // create/retrieve item
 // --------------------
 
 // create/retrieve item
 // --------------------
 
 wxOwnerDrawn *wxCheckListBox::CreateItem(size_t nIndex)
 {
   wxCheckListBoxItem *pItem = new wxCheckListBoxItem(this, nIndex);
 wxOwnerDrawn *wxCheckListBox::CreateItem(size_t nIndex)
 {
   wxCheckListBoxItem *pItem = new wxCheckListBoxItem(this, nIndex);
-  if ( m_font.Ok() )
-    pItem->SetFont(m_font);
-