]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/widgets/dirctrl.cpp
include wx/arrstr.h as it's needed by wxImageHandler and may not be implicitly includ...
[wxWidgets.git] / samples / widgets / dirctrl.cpp
index 646d03ae9c99d9c24a583a80caac8c81eb9a6fd9..1d8ad59cbd38ede41763d2df59e248ad69544dec 100644 (file)
@@ -35,6 +35,7 @@
     #include "wx/radiobox.h"
     #include "wx/checkbox.h"
     #include "wx/button.h"
+    #include "wx/filedlg.h"
 #endif
 
 #include "wx/generic/dirctrlg.h"
@@ -132,7 +133,9 @@ protected:
     wxCheckBox *m_chkDirOnly,
                *m_chk3D,
                *m_chkFirst,
-               *m_chkLabels;
+               *m_chkLabels,
+               *m_chkMulti;
+
     // filters
     wxCheckBox *m_fltr[3];
 
@@ -184,6 +187,7 @@ void DirCtrlWidgetsPage::CreateContent()
     m_chk3D      = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_3D_INTERNAL"));
     m_chkFirst   = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_SELECT_FIRST"));
     m_chkLabels  = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_EDIT_LABELS"));
+    m_chkMulti   = CreateCheckBoxAndAddToSizer(sizerUseFlags, _T("wxDIRCTRL_MULTIPLE"));
     sizerLeft->Add(sizerUseFlags, wxSizerFlags().Expand().Border());
 
     wxSizer *sizerFilters =
@@ -244,13 +248,14 @@ void DirCtrlWidgetsPage::CreateDirCtrl()
         ( m_chkDirOnly->IsChecked() ? wxDIRCTRL_DIR_ONLY : 0 ) |
         ( m_chk3D->IsChecked() ? wxDIRCTRL_3D_INTERNAL : 0 ) |
         ( m_chkFirst->IsChecked() ? wxDIRCTRL_SELECT_FIRST : 0 ) |
-        ( m_chkLabels->IsChecked() ? wxDIRCTRL_EDIT_LABELS : 0 )
+        ( m_chkLabels->IsChecked() ? wxDIRCTRL_EDIT_LABELS : 0 ) |
+        ( m_chkMulti->IsChecked() ? wxDIRCTRL_MULTIPLE : 0)
     );
 
     wxString filter;
-    for (int i = 0; i < 3; ++i) 
+    for (int i = 0; i < 3; ++i)
     {
-        if (m_fltr[i]->IsChecked()) 
+        if (m_fltr[i]->IsChecked())
         {
             if (!filter.IsEmpty())
                 filter += wxT("|");