2001-05-05 14:05:12 -04:00
|
|
|
// For compilers that support precompilation, includes "wx/wx.h".
|
|
|
|
#include "wx/wxprec.h"
|
|
|
|
|
|
|
|
#ifdef __BORLANDC__
|
|
|
|
#pragma hdrstop
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// for all others, include the necessary headers (this file is usually all you
|
2004-05-25 07:20:37 -04:00
|
|
|
// need because it includes almost all "standard" wxWidgets headers)
|
2001-05-05 14:05:12 -04:00
|
|
|
#ifndef WX_PRECOMP
|
|
|
|
#include "wx/wx.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "wx/gizmos/editlbox.h"
|
|
|
|
#include "wx/sizer.h"
|
|
|
|
|
|
|
|
class MyApp : public wxApp
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual bool OnInit();
|
|
|
|
};
|
|
|
|
|
|
|
|
IMPLEMENT_APP(MyApp)
|
|
|
|
|
|
|
|
|
|
|
|
bool MyApp::OnInit()
|
|
|
|
{
|
2004-06-08 15:27:42 -04:00
|
|
|
wxDialog dlg(NULL, wxID_ANY, _("Test dialog"), wxDefaultPosition, wxDefaultSize,
|
2001-05-05 14:05:12 -04:00
|
|
|
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER);
|
|
|
|
|
|
|
|
wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
|
2004-06-08 15:27:42 -04:00
|
|
|
sizer->Add(new wxEditableListBox(&dlg, wxID_ANY, _("Match these wildcards:"),
|
2001-05-05 14:05:12 -04:00
|
|
|
wxDefaultPosition,wxSize(300,200)),
|
|
|
|
1, wxEXPAND|wxALL, 10);
|
|
|
|
|
|
|
|
sizer->Add(5,5);
|
|
|
|
|
2004-06-08 15:27:42 -04:00
|
|
|
wxEditableListBox *lb = new wxEditableListBox(&dlg, wxID_ANY, _("Except:"),
|
2001-05-05 14:05:12 -04:00
|
|
|
wxDefaultPosition,wxSize(300,200));
|
|
|
|
wxArrayString ar;
|
|
|
|
ar.Add(_T("*.cpp"));
|
|
|
|
ar.Add(_T("*.h"));
|
|
|
|
ar.Add(_T("*.c"));
|
|
|
|
lb->SetStrings(ar);
|
|
|
|
|
|
|
|
sizer->Add(lb, 1, wxEXPAND|wxALL, 10);
|
|
|
|
|
|
|
|
sizer->Add(5,5);
|
|
|
|
|
|
|
|
sizer->Add(new wxButton(&dlg, wxID_OK, _("OK")), 0, wxALIGN_RIGHT | wxALL, 10);
|
2004-06-08 15:27:42 -04:00
|
|
|
dlg.SetAutoLayout(true);
|
2001-05-05 14:05:12 -04:00
|
|
|
dlg.SetSizer(sizer);
|
|
|
|
sizer->Fit(&dlg);
|
2004-06-08 15:27:42 -04:00
|
|
|
dlg.Centre();
|
2001-05-05 14:05:12 -04:00
|
|
|
|
|
|
|
dlg.ShowModal();
|
|
|
|
|
|
|
|
wxString res = _("'Except' contains these strings:\n\n");
|
|
|
|
lb->GetStrings(ar);
|
|
|
|
for (size_t i = 0; i < ar.GetCount(); i++)
|
|
|
|
res << ar[i] << _T("\n");
|
|
|
|
wxMessageBox(res);
|
|
|
|
|
2004-06-08 15:27:42 -04:00
|
|
|
return false;
|
2001-05-05 14:05:12 -04:00
|
|
|
}
|