-1->wxID_ANY, TRUE->true, FALSE->false, wxDefaultPosition & wxDefaultSize replacements

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2004-05-27 17:50:54 +00:00
parent 3ac8bd7b53
commit 5014bb3a2f
7 changed files with 58 additions and 59 deletions

View File

@ -177,15 +177,15 @@ bool MyApp::OnInit()
// and show it (the frames, unlike simple controls, are not shown when // and show it (the frames, unlike simple controls, are not shown when
// created initially) // created initially)
frame->Show(TRUE); frame->Show(true);
// success: wxApp::OnRun() will be called which will enter the main message // success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the // loop and the application will run. If we returned false here, the
// application would exit immediately. // application would exit immediately.
return TRUE; return true;
#else #else
wxMessageBox( _T("This sample has to be compiled with wxUSE_ACCESSIBILITY"), _T("Building error"), wxOK); wxMessageBox( _T("This sample has to be compiled with wxUSE_ACCESSIBILITY"), _T("Building error"), wxOK);
return FALSE; return false;
#endif // wxUSE_ACCESSIBILITY #endif // wxUSE_ACCESSIBILITY
} }
@ -304,7 +304,7 @@ public:
// Gets a variant representing the selected children // Gets a variant representing the selected children
// of this object. // of this object.
// Acceptable values: // Acceptable values:
// - a null variant (IsNull() returns TRUE) // - a null variant (IsNull() returns true)
// - a list variant (GetType() == wxT("list")) // - a list variant (GetType() == wxT("list"))
// - an integer representing the selected child element, // - an integer representing the selected child element,
// or 0 if this object is selected (GetType() == wxT("long")) // or 0 if this object is selected (GetType() == wxT("long"))
@ -319,7 +319,7 @@ public:
// frame constructor // frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style) MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxFrame(NULL, -1, title, pos, size, style) : wxFrame(NULL, wxID_ANY, title, pos, size, style)
{ {
m_textCtrl = NULL; m_textCtrl = NULL;
@ -356,10 +356,10 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
#endif // wxUSE_STATUSBAR #endif // wxUSE_STATUSBAR
wxSplitterWindow* splitter = new wxSplitterWindow(this, -1); wxSplitterWindow* splitter = new wxSplitterWindow(this, wxID_ANY);
splitter->SetAccessible(new SplitterWindowAccessible(splitter)); splitter->SetAccessible(new SplitterWindowAccessible(splitter));
wxListBox* listBox = new wxListBox(splitter, -1); wxListBox* listBox = new wxListBox(splitter, wxID_ANY);
listBox->Append(wxT("Cabbages")); listBox->Append(wxT("Cabbages"));
listBox->Append(wxT("Kings")); listBox->Append(wxT("Kings"));
listBox->Append(wxT("Sealing wax")); listBox->Append(wxT("Sealing wax"));
@ -367,7 +367,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
listBox->CreateAccessible(); listBox->CreateAccessible();
listBox->SetHelpText(wxT("This is a sample wxWidgets listbox, with a number of items in it.")); listBox->SetHelpText(wxT("This is a sample wxWidgets listbox, with a number of items in it."));
m_textCtrl = new wxTextCtrl(splitter, -1, wxT(""), wxDefaultPosition, m_textCtrl = new wxTextCtrl(splitter, wxID_ANY, wxT(""), wxDefaultPosition,
wxDefaultSize, wxTE_MULTILINE); wxDefaultSize, wxTE_MULTILINE);
m_textCtrl->CreateAccessible(); m_textCtrl->CreateAccessible();
m_textCtrl->SetHelpText(wxT("This is a sample wxWidgets multiline text control.")); m_textCtrl->SetHelpText(wxT("This is a sample wxWidgets multiline text control."));
@ -375,7 +375,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
splitter->SplitHorizontally(listBox, m_textCtrl, 150); splitter->SplitHorizontally(listBox, m_textCtrl, 150);
#if 0 #if 0
wxScrolledWindow* scrolledWindow = new wxScrolledWindow(this, -1); wxScrolledWindow* scrolledWindow = new wxScrolledWindow(this, wxID_ANY);
scrolledWindow->SetAccessible(new ScrolledWindowAccessible(scrolledWindow)); scrolledWindow->SetAccessible(new ScrolledWindowAccessible(scrolledWindow));
#endif #endif
} }
@ -385,8 +385,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{ {
// TRUE is to force the frame to close // true is to force the frame to close
Close(TRUE); Close(true);
} }
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
@ -498,7 +498,7 @@ void MyFrame::LogObject(int indent, IAccessible* obj)
wxString str; wxString str;
str.Printf(wxT("Name = %s; Role = %s"), name.c_str(), role.c_str()); str.Printf(wxT("Name = %s; Role = %s"), name.c_str(), role.c_str());
str.Pad(indent, wxT(' '), FALSE); str.Pad(indent, wxT(' '), false);
Log(str); Log(str);
} }
@ -507,7 +507,7 @@ void MyFrame::LogObject(int indent, IAccessible* obj)
{ {
wxString str; wxString str;
str.Printf(wxT("There are %d children."), (int) childCount); str.Printf(wxT("There are %d children."), (int) childCount);
str.Pad(indent, wxT(' '), FALSE); str.Pad(indent, wxT(' '), false);
Log(str); Log(str);
Log(wxT("")); Log(wxT(""));
} }
@ -519,7 +519,7 @@ void MyFrame::LogObject(int indent, IAccessible* obj)
wxString str; wxString str;
str.Printf(wxT("%d) Name = %s; Role = %s"), i, name.c_str(), role.c_str()); str.Printf(wxT("%d) Name = %s; Role = %s"), i, name.c_str(), role.c_str());
str.Pad(indent, wxT(' '), FALSE); str.Pad(indent, wxT(' '), false);
Log(str); Log(str);
VARIANT var; VARIANT var;
@ -533,7 +533,7 @@ void MyFrame::LogObject(int indent, IAccessible* obj)
{ {
wxString str; wxString str;
str.Printf(wxT("This is a real object.")); str.Printf(wxT("This is a real object."));
str.Pad(indent+4, wxT(' '), FALSE); str.Pad(indent+4, wxT(' '), false);
Log(str); Log(str);
if (pDisp->QueryInterface(IID_IAccessible, (LPVOID*) & childObject) == S_OK) if (pDisp->QueryInterface(IID_IAccessible, (LPVOID*) & childObject) == S_OK)
@ -547,7 +547,7 @@ void MyFrame::LogObject(int indent, IAccessible* obj)
{ {
wxString str; wxString str;
str.Printf(wxT("This is an element.")); str.Printf(wxT("This is an element."));
str.Pad(indent+4, wxT(' '), FALSE); str.Pad(indent+4, wxT(' '), false);
Log(str); Log(str);
} }
// Log(wxT("")); // Log(wxT(""));
@ -1100,7 +1100,7 @@ wxAccStatus SplitterWindowAccessible::GetFocus(int* WXUNUSED(childId), wxAccessi
// Gets a variant representing the selected children // Gets a variant representing the selected children
// of this object. // of this object.
// Acceptable values: // Acceptable values:
// - a null variant (IsNull() returns TRUE) // - a null variant (IsNull() returns true)
// - a list variant (GetType() == wxT("list")) // - a list variant (GetType() == wxT("list"))
// - an integer representing the selected child element, // - an integer representing the selected child element,
// or 0 if this object is selected (GetType() == wxT("long")) // or 0 if this object is selected (GetType() == wxT("long"))

View File

@ -107,35 +107,35 @@ static void FillBitmaps(wxImageList *images, wxListCtrl *list,
#include "null.xpm" #include "null.xpm"
BEGIN_EVENT_TABLE(wxArtBrowserDialog, wxDialog) BEGIN_EVENT_TABLE(wxArtBrowserDialog, wxDialog)
EVT_LIST_ITEM_SELECTED(-1, wxArtBrowserDialog::OnSelectItem) EVT_LIST_ITEM_SELECTED(wxID_ANY, wxArtBrowserDialog::OnSelectItem)
EVT_CHOICE(-1, wxArtBrowserDialog::OnChooseClient) EVT_CHOICE(wxID_ANY, wxArtBrowserDialog::OnChooseClient)
END_EVENT_TABLE() END_EVENT_TABLE()
wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent) wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
: wxDialog(parent, -1, _T("Art resources browser"), : wxDialog(parent, wxID_ANY, _T("Art resources browser"),
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
{ {
wxSizer *sizer = new wxBoxSizer(wxVERTICAL); wxSizer *sizer = new wxBoxSizer(wxVERTICAL);
wxSizer *subsizer; wxSizer *subsizer;
wxChoice *choice = new wxChoice(this, -1); wxChoice *choice = new wxChoice(this, wxID_ANY);
FillClients(choice); FillClients(choice);
subsizer = new wxBoxSizer(wxHORIZONTAL); subsizer = new wxBoxSizer(wxHORIZONTAL);
subsizer->Add(new wxStaticText(this, -1, _T("Client:")), 0, wxALIGN_CENTER_VERTICAL); subsizer->Add(new wxStaticText(this, wxID_ANY, _T("Client:")), 0, wxALIGN_CENTER_VERTICAL);
subsizer->Add(choice, 1, wxLEFT, 5); subsizer->Add(choice, 1, wxLEFT, 5);
sizer->Add(subsizer, 0, wxALL | wxEXPAND, 10); sizer->Add(subsizer, 0, wxALL | wxEXPAND, 10);
subsizer = new wxBoxSizer(wxHORIZONTAL); subsizer = new wxBoxSizer(wxHORIZONTAL);
m_list = new wxListCtrl(this, -1, wxDefaultPosition, wxSize(250, 300), m_list = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxSize(250, 300),
wxLC_REPORT | wxSUNKEN_BORDER); wxLC_REPORT | wxSUNKEN_BORDER);
m_list->InsertColumn(0, _T("wxArtID")); m_list->InsertColumn(0, _T("wxArtID"));
subsizer->Add(m_list, 1, wxEXPAND | wxRIGHT, 10); subsizer->Add(m_list, 1, wxEXPAND | wxRIGHT, 10);
wxSizer *subsub = new wxBoxSizer(wxVERTICAL); wxSizer *subsub = new wxBoxSizer(wxVERTICAL);
m_canvas = new wxStaticBitmap(this, -1, wxBitmap(null_xpm)); m_canvas = new wxStaticBitmap(this, wxID_ANY, wxBitmap(null_xpm));
subsub->Add(m_canvas); subsub->Add(m_canvas);
subsub->Add(100, 100); subsub->Add(100, 100);
subsizer->Add(subsub); subsizer->Add(subsub);
@ -147,7 +147,7 @@ wxArtBrowserDialog::wxArtBrowserDialog(wxWindow *parent)
sizer->Add(ok, 0, wxALIGN_RIGHT | wxALL, 10); sizer->Add(ok, 0, wxALIGN_RIGHT | wxALL, 10);
SetSizer(sizer); SetSizer(sizer);
SetAutoLayout(TRUE); SetAutoLayout(true);
sizer->Fit(this); sizer->Fit(this);
choice->SetSelection(6/*wxART_MESSAGE_BOX*/); choice->SetSelection(6/*wxART_MESSAGE_BOX*/);

View File

@ -95,8 +95,8 @@ bool MyApp::OnInit()
// create the main application window // create the main application window
MyFrame *frame = new MyFrame(_T("wxArtProvider sample"), MyFrame *frame = new MyFrame(_T("wxArtProvider sample"),
wxPoint(50, 50), wxSize(450, 340)); wxPoint(50, 50), wxSize(450, 340));
frame->Show(TRUE); frame->Show(true);
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -141,7 +141,7 @@ wxBitmap MyArtProvider::CreateBitmap(const wxArtID& id,
// frame constructor // frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style) MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size, long style)
: wxFrame(NULL, -1, title, pos, size, style) : wxFrame(NULL, wxID_ANY, title, pos, size, style)
{ {
SetIcon(wxICON(mondrian)); SetIcon(wxICON(mondrian));
@ -175,8 +175,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{ {
// TRUE is to force the frame to close // true is to force the frame to close
Close(TRUE); Close(true);
} }
void MyFrame::OnLogs(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnLogs(wxCommandEvent& WXUNUSED(event))

View File

@ -205,7 +205,7 @@ bool MyApp::OnInit()
frame->Show(true); frame->Show(true);
// success: wxApp::OnRun() will be called which will enter the main message // success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the // loop and the application will run. If we returned false here, the
// application would exit immediately. // application would exit immediately.
return true; return true;
} }
@ -279,7 +279,7 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{ {
// TRUE is to force the frame to close // true is to force the frame to close
Close(true); Close(true);
} }

View File

@ -186,12 +186,12 @@ bool MyApp::OnInit()
MyFrame *frame = new MyFrame(_T("Caret wxWidgets sample"), MyFrame *frame = new MyFrame(_T("Caret wxWidgets sample"),
wxPoint(50, 50), wxSize(450, 340)); wxPoint(50, 50), wxSize(450, 340));
frame->Show(TRUE); frame->Show(true);
// success: wxApp::OnRun() will be called which will enter the main message // success: wxApp::OnRun() will be called which will enter the main message
// loop and the application will run. If we returned FALSE here, the // loop and the application will run. If we returned false here, the
// application would exit immediately. // application would exit immediately.
return TRUE; return true;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@ -200,7 +200,7 @@ bool MyApp::OnInit()
// frame constructor // frame constructor
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size) MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size) : wxFrame((wxFrame *)NULL, wxID_ANY, title, pos, size)
{ {
// set the frame icon // set the frame icon
SetIcon(wxICON(mondrian)); SetIcon(wxICON(mondrian));
@ -235,8 +235,8 @@ MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{ {
// TRUE is to force the frame to close // true is to force the frame to close
Close(TRUE); Close(true);
} }
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
@ -298,7 +298,7 @@ BEGIN_EVENT_TABLE(MyCanvas, wxScrolledWindow)
END_EVENT_TABLE() END_EVENT_TABLE()
MyCanvas::MyCanvas( wxWindow *parent ) MyCanvas::MyCanvas( wxWindow *parent )
: wxScrolledWindow( parent, -1, : wxScrolledWindow( parent, wxID_ANY,
wxDefaultPosition, wxDefaultSize, wxDefaultPosition, wxDefaultSize,
wxSUNKEN_BORDER ) wxSUNKEN_BORDER )
{ {

View File

@ -114,7 +114,7 @@ bool MyApp::OnInit()
// create the main program window // create the main program window
MyFrame *frame = new MyFrame; MyFrame *frame = new MyFrame;
frame->Show(TRUE); frame->Show(true);
SetTopWindow(frame); SetTopWindow(frame);
// use our config object... // use our config object...
@ -126,7 +126,7 @@ bool MyApp::OnInit()
wxICON_INFORMATION | wxOK); wxICON_INFORMATION | wxOK);
} }
return TRUE; return true;
} }
int MyApp::OnExit() int MyApp::OnExit()
@ -145,7 +145,7 @@ int MyApp::OnExit()
// main frame ctor // main frame ctor
MyFrame::MyFrame() MyFrame::MyFrame()
: wxFrame((wxFrame *) NULL, -1, _T("wxConfig Demo")) : wxFrame((wxFrame *) NULL, wxID_ANY, _T("wxConfig Demo"))
{ {
// menu // menu
wxMenu *file_menu = new wxMenu; wxMenu *file_menu = new wxMenu;
@ -163,10 +163,10 @@ MyFrame::MyFrame()
// child controls // child controls
wxPanel *panel = new wxPanel(this); wxPanel *panel = new wxPanel(this);
(void)new wxStaticText(panel, -1, _T("These controls remember their values!"), (void)new wxStaticText(panel, wxID_ANY, _T("These controls remember their values!"),
wxPoint(10, 10), wxSize(300, 20)); wxPoint(10, 10), wxSize(300, 20));
m_text = new wxTextCtrl(panel, -1, _T(""), wxPoint(10, 40), wxSize(300, 20)); m_text = new wxTextCtrl(panel, wxID_ANY, _T(""), wxPoint(10, 40), wxSize(300, 20));
m_check = new wxCheckBox(panel, -1, _T("show welcome message box at startup"), m_check = new wxCheckBox(panel, wxID_ANY, _T("show welcome message box at startup"),
wxPoint(10, 70), wxSize(300, 20)); wxPoint(10, 70), wxSize(300, 20));
// restore the control's values from the config // restore the control's values from the config
@ -209,7 +209,7 @@ MyFrame::MyFrame()
void MyFrame::OnQuit(wxCommandEvent&) void MyFrame::OnQuit(wxCommandEvent&)
{ {
Close(TRUE); Close(true);
} }
void MyFrame::OnAbout(wxCommandEvent&) void MyFrame::OnAbout(wxCommandEvent&)

View File

@ -658,8 +658,8 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
#if wxUSE_CHOICE #if wxUSE_CHOICE
panel = new wxPanel(m_notebook); panel = new wxPanel(m_notebook);
m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,-1), 5, choices ); m_choice = new wxChoice( panel, ID_CHOICE, wxPoint(10,10), wxSize(120,wxDefaultSize.y), 5, choices );
m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,-1), m_choiceSorted = new wxChoice( panel, ID_CHOICE_SORTED, wxPoint(10,70), wxSize(120,wxDefaultSize.y),
5, choices, wxCB_SORT ); 5, choices, wxCB_SORT );
SetChoiceClientData(wxT("choice"), m_choice); SetChoiceClientData(wxT("choice"), m_choice);
@ -682,7 +682,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
(void)new wxStaticBox( panel, wxID_ANY, _T("&Box around combobox"), (void)new wxStaticBox( panel, wxID_ANY, _T("&Box around combobox"),
wxPoint(5, 5), wxSize(150, 100)); wxPoint(5, 5), wxSize(150, 100));
m_combo = new MyComboBox( panel, ID_COMBO, _T("This"), m_combo = new MyComboBox( panel, ID_COMBO, _T("This"),
wxPoint(20,25), wxSize(120, -1), wxPoint(20,25), wxSize(120, wxDefaultSize.y),
5, choices, 5, choices,
wxCB_READONLY | wxPROCESS_ENTER); wxCB_READONLY | wxPROCESS_ENTER);
m_combo->SetBackgroundColour(*wxBLUE); m_combo->SetBackgroundColour(*wxBLUE);
@ -732,7 +732,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
m_gaugeVert = new wxGauge( panel, wxID_ANY, 100, m_gaugeVert = new wxGauge( panel, wxID_ANY, 100,
wxPoint(195,35), wxSize(30, 90), wxPoint(195,35), wxSize(30, 90),
wxGA_VERTICAL | wxGA_SMOOTH | wxNO_BORDER ); wxGA_VERTICAL | wxGA_SMOOTH | wxNO_BORDER );
m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,-1), m_slider = new wxSlider( panel, ID_SLIDER, 0, 0, 200, wxPoint(18,90), wxSize(155,wxDefaultSize.y),
wxSL_AUTOTICKS | wxSL_LABELS ); wxSL_AUTOTICKS | wxSL_LABELS );
m_slider->SetTickFreq(40, 0); m_slider->SetTickFreq(40, 0);
#if wxUSE_TOOLTIPS #if wxUSE_TOOLTIPS
@ -748,7 +748,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
(void)new wxStaticText( panel, wxID_ANY, (void)new wxStaticText( panel, wxID_ANY,
_T("Drag the slider!"), _T("Drag the slider!"),
wxPoint(250,30), wxPoint(250,30),
wxSize(240, -1) wxSize(240, wxDefaultSize.y)
); );
#else #else
(void)new wxStaticText( panel, wxID_ANY, (void)new wxStaticText( panel, wxID_ANY,
@ -765,9 +765,9 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
int initialSpinValue = -5; int initialSpinValue = -5;
wxString s; wxString s;
s << initialSpinValue; s << initialSpinValue;
m_spintext = new wxTextCtrl( panel, wxID_ANY, s, wxPoint(20,160), wxSize(80,-1) ); m_spintext = new wxTextCtrl( panel, wxID_ANY, s, wxPoint(20,160), wxSize(80,wxDefaultSize.y) );
#if wxUSE_SPINBTN #if wxUSE_SPINBTN
m_spinbutton = new wxSpinButton( panel, ID_SPIN, wxPoint(103,160), wxSize(80, -1) ); m_spinbutton = new wxSpinButton( panel, ID_SPIN, wxPoint(103,160), wxSize(80, wxDefaultSize.y) );
m_spinbutton->SetRange(-40,30); m_spinbutton->SetRange(-40,30);
m_spinbutton->SetValue(initialSpinValue); m_spinbutton->SetValue(initialSpinValue);
@ -776,7 +776,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
#endif // wxUSE_SPINBTN #endif // wxUSE_SPINBTN
#if wxUSE_SPINCTRL #if wxUSE_SPINCTRL
m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, _T(""), wxPoint(200, 160), wxSize(80, -1) ); m_spinctrl = new wxSpinCtrl( panel, ID_SPINCTRL, _T(""), wxPoint(200, 160), wxSize(80, wxDefaultSize.y) );
m_spinctrl->SetRange(10,30); m_spinctrl->SetRange(10,30);
m_spinctrl->SetValue(15); m_spinctrl->SetValue(15);
#endif // wxUSE_SPINCTRL #endif // wxUSE_SPINCTRL
@ -852,8 +852,7 @@ MyPanel::MyPanel( wxFrame *frame, int x, int y, int w, int h )
wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer *sizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer *csizer = wxStaticBoxSizer *csizer =
new wxStaticBoxSizer (new wxStaticBox (panel, wxID_ANY, _T("Show Buttons")), new wxStaticBoxSizer (new wxStaticBox (panel, wxID_ANY, _T("Show Buttons")), wxHORIZONTAL );
wxHORIZONTAL );
wxCheckBox *check1, *check2, *check3, *check4, *check14, *checkBig; wxCheckBox *check1, *check2, *check3, *check4, *check14, *checkBig;
check1 = new wxCheckBox (panel, ID_SIZER_CHECK1, _T("1")); check1 = new wxCheckBox (panel, ID_SIZER_CHECK1, _T("1"));
@ -1055,9 +1054,9 @@ void MyPanel::OnListBoxButtons( wxCommandEvent &event )
} }
case ID_LISTBOX_SEL_STR: case ID_LISTBOX_SEL_STR:
{ {
if (m_listbox->FindString(_T("This")) > -1) if (m_listbox->FindString(_T("This")) != wxNOT_FOUND)
m_listbox->SetStringSelection( _T("This") ); m_listbox->SetStringSelection( _T("This") );
if (m_listboxSorted->FindString(_T("This")) > -1) if (m_listboxSorted->FindString(_T("This")) != wxNOT_FOUND)
m_listboxSorted->SetStringSelection( _T("This") ); m_listboxSorted->SetStringSelection( _T("This") );
m_lbSelectNum->WarpPointer( 40, 14 ); m_lbSelectNum->WarpPointer( 40, 14 );
break; break;