#endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL
- void OnSpinCtrl(wxCommandEvent& event);
+ void OnSpinCtrl(wxSpinEvent& event);
#endif // wxUSE_SPINCTRL
void OnEnableAll(wxCommandEvent& event);
frame->Show(TRUE);
frame->SetCursor(wxCursor(wxCURSOR_HAND));
- frame->GetPanel()->m_notebook->SetSelection(6);
+ //frame->GetPanel()->m_notebook->SetSelection(6);
SetTopWindow(frame);
m_text = new wxTextCtrl(this, -1, "This is the log window.\n",
wxPoint(0, 250), wxSize(100, 50), wxTE_MULTILINE);
- // m_text->SetBackgroundColour("wheat");
+ m_text->SetBackgroundColour("wheat");
- wxLog::AddTraceMask(_T("focus"));
+ if ( 0 )
+ wxLog::AddTraceMask(_T("focus"));
m_logTargetOld = wxLog::SetActiveTarget(new wxLogTextCtrl(m_text));
m_notebook = new wxNotebook(this, ID_NOTEBOOK);
(void)new wxBitmapButton(panel, -1, bitmap, wxPoint(100, 20));
-#if 0
+#ifdef __WXMSW__
// test for masked bitmap display
bitmap = wxBitmap("test2.bmp", wxBITMAP_TYPE_BMP);
- bitmap.SetMask(new wxMask(bitmap, *wxBLUE));
- (void)new wxBitmapButton(panel, -1, bitmap, wxPoint(300, 120));
+ if (bitmap.Ok())
+ {
+ bitmap.SetMask(new wxMask(bitmap, *wxBLUE));
+ (void)new wxStaticBitmap /* wxBitmapButton */ (panel, -1, bitmap, wxPoint(300, 120));
+ }
#endif
wxBitmap bmp1(wxTheApp->GetStdIcon(wxICON_INFORMATION)),
m_label = new wxStaticText(panel, -1, "Label with some long text",
wxPoint(250, 60), wxDefaultSize,
wxALIGN_RIGHT | wxST_NO_AUTORESIZE);
+ m_label->SetForegroundColour( *wxBLUE );
m_notebook->AddPage(panel, "wxBitmapXXX");
SetBackgroundColour(s_colOld);
s_colOld = wxNullColour;
- m_lbSelectThis->SetForegroundColour("yellow");
- m_lbSelectThis->SetBackgroundColour("blue");
+ m_lbSelectThis->SetForegroundColour("red");
+ m_lbSelectThis->SetBackgroundColour("white");
}
else
{
- s_colOld = GetBackgroundColour();
- SetBackgroundColour("green");
+ s_colOld = wxColour("red");
+ SetBackgroundColour("white");
m_lbSelectThis->SetForegroundColour("white");
m_lbSelectThis->SetBackgroundColour("red");
m_lbSelectThis->Enable( event.GetInt() == 0 );
m_lbSelectNum->Enable( event.GetInt() == 0 );
m_listboxSorted->Enable( event.GetInt() == 0 );
+ FindWindow(ID_CHANGE_COLOUR)->Enable( event.GetInt() == 0 );
break;
}
case ID_LISTBOX_SEL_NUM:
#if wxUSE_SPINCTRL
-void MyPanel::OnSpinCtrl(wxCommandEvent& event)
+void MyPanel::OnSpinCtrl(wxSpinEvent& event)
{
wxString s;
s.Printf(_T("Spin ctrl changed: now %d (from event: %d)\n"),
bool cont = TRUE;
- for ( int i = 0; i < max && cont; i++ )
+ for ( int i = 0; i <= max && cont; i++ )
{
wxSleep(1);
- if ( i == max - 1 )
+ if ( i == max )
{
cont = dialog.Update(i, "That's all, folks!");
}
else if ( i == max / 2 )
{
- cont = dialog.Update(i, "Only a half left!");
+ cont = dialog.Update(i, "Only a half left (very long message)!");
}
else
{
void MyFrame::OnAbout( wxCommandEvent& WXUNUSED(event) )
{
- wxBeginBusyCursor();
+ wxBusyCursor bc;
+
+#if 0 // VZ: my temp test code, will remove
+ wxGetTextFromUser("msg", "caption", "val", this);
+ return;
+#endif // 0
wxMessageDialog dialog(this, "This is a control sample", "About Controls", wxOK );
dialog.ShowModal();
-
- wxEndBusyCursor();
}
void MyFrame::OnClearLog(wxCommandEvent& WXUNUSED(event))