#include "wx/tooltip.h"
#endif
-#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__)
+#if defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) || defined(__WXMGL__)
#define USE_XPM
#endif
m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,-1),
wxSL_AUTOTICKS | wxSL_LABELS );
m_slider->SetTickFreq(40, 0);
- (void)new wxStaticBox( panel, -1, "&Explanation", wxPoint(230,10), wxSize(270,130) );
+ (void)new wxStaticBox( panel, -1, "&Explanation",
+ wxPoint(230,10), wxSize(270,130),
+ wxALIGN_CENTER );
+
#ifdef __WXMOTIF__
// No wrapping text in wxStaticText yet :-(
(void)new wxStaticText( panel, -1,
void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) )
{
int max = m_spinbutton->GetValue();
+
+ if ( max <= 0 )
+ {
+ wxLogError(_T("You must set positive range!"));
+ return;
+ }
+
wxProgressDialog dialog("Progress dialog example",
"An informative message",
max, // range