fontBmp(14, wxDEFAULT, wxNORMAL, wxNORMAL, FALSE);
// sorry for my artistic skills...
- wxBitmap bmpBell(_T("bell")), bmpSound(_T("sound")), bmpNoSound(_T("nosound"));
- wxBitmap bmpInfo(_T("info")), bmpInfo_mono(_T("info_mono"));
+ wxBitmap bmpBell(_T("bell")),
+ bmpSound(_T("sound")),
+ bmpNoSound(_T("nosound")),
+ bmpInfo(_T("info")),
+ bmpInfo_mono(_T("info_mono"));
// construct submenu
pItem = new wxMenuItem(sub_menu, Menu_Sub1, _T("Submenu &first"), _T("large"));
pItem = new wxMenuItem(file_menu, Menu_Test1, _T("&Uncheckable"), _T("red item"));
pItem->SetFont(*wxITALIC_FONT);
pItem->SetTextColour(wxColor(255, 0, 0));
- pItem->SetMarginWidth(23);
file_menu->Append(pItem);
pItem = new wxMenuItem(file_menu, Menu_Test2, _T("&Checkable"),
_T("display program information"), wxITEM_NORMAL);
pAboutItem->SetBitmap(bmpInfo);
pAboutItem->SetDisabledBitmap(bmpInfo_mono);
- pAboutItem->SetOwnerDrawn(TRUE);
file_menu->Append(pAboutItem);
file_menu->AppendSeparator();
pItem = new wxMenuItem(file_menu, Menu_Quit, _T("&Quit"), _T("Normal item"),
wxITEM_NORMAL);
- pItem->SetFont(*wxNORMAL_FONT);
file_menu->Append(pItem);
wxMenuBar *menu_bar = new wxMenuBar;
SetStatusText(_T("no selection"), 0);
// make a panel with some controls
- wxPanel *pPanel = new wxPanel(this, -1, wxPoint(0, 0),
- wxSize(400, 200), wxTAB_TRAVERSAL);
+ wxPanel *pPanel = new wxPanel(this);
// check list box
static const wxChar* aszChoices[] = { _T("Hello"), _T("world"), _T("and"),
pPanel, // parent
Control_Listbox2, // control id
wxPoint(220, 10), // listbox position
- wxDefaultSize, // listbox size
- WXSIZEOF(aszColors), // number of strings
+ wxSize(200, 200), // listbox size
+ WXSIZEOF(aszColors), // number of strings
astrChoices, // array of strings
- wxLB_OWNERDRAW, // owner-drawn
- wxDefaultValidator, //
- wxListBoxNameStr
+ wxLB_OWNERDRAW // owner-drawn
);
for ( ui = 0; ui < WXSIZEOF(aszColors); ui++ )
{
}
-void OwnerDrawnFrame::OnQuit(wxCommandEvent& event)
+void OwnerDrawnFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
Close(TRUE);
}
-void OwnerDrawnFrame::OnMenuToggle(wxCommandEvent& event)
+void OwnerDrawnFrame::OnMenuToggle(wxCommandEvent& WXUNUSED(event))
{
// This example shows the use of bitmaps in ownerdrawn menuitems and is not a good
// example on how to enable and disable menuitems - this should be done with the help of
pAboutItem->Enable( pAboutItem->IsEnabled() ? FALSE : TRUE );
}
-void OwnerDrawnFrame::OnAbout(wxCommandEvent& event)
+void OwnerDrawnFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
wxMessageDialog dialog(this,
_T("Demo of owner-drawn controls\n"),
SetStatusText(strSelection);
}
-void OwnerDrawnFrame::OnListboxDblClick(wxCommandEvent& event)
+void OwnerDrawnFrame::OnListboxDblClick(wxCommandEvent& WXUNUSED(event))
{
wxString strSelection;
strSelection.Printf(wxT("item %d double clicked"),