SetMenuBar(menuBar);
// create a status bar just for fun (by default with 1 pane only)
+ // but don't create it on limited screen space (WinCE)
+ bool is_pda = wxSystemSettings::GetScreenType() <= wxSYS_SCREEN_PDA;
+
#if wxUSE_STATUSBAR
- CreateStatusBar(2);
- SetStatusText(_T("Welcome to wxRichTextCtrl!"));
+ if ( !is_pda )
+ {
+ CreateStatusBar(2);
+ SetStatusText(_T("Welcome to wxRichTextCtrl!"));
+ }
#endif
wxToolBar* toolBar = CreateToolBar();
m_richTextCtrl->SetFont(font);
wxRichTextStyleListBox* styleListBox = new wxRichTextStyleListBox(splitter, wxID_ANY);
- splitter->SplitVertically(m_richTextCtrl, styleListBox, 400);
+
+ wxSize display = wxGetDisplaySize();
+ if ( is_pda && ( display.GetWidth() < display.GetHeight() ) )
+ {
+ splitter->SplitHorizontally(m_richTextCtrl, styleListBox);
+ }
+ else
+ {
+ splitter->SplitVertically(m_richTextCtrl, styleListBox, 400);
+ }
splitter->UpdateSize();
attr.SetFlags(wxTEXT_ATTR_TABS);
attr.SetTabs(tabs);
r.SetDefaultStyle(attr);
-
+
r.Newline();
r.WriteText(wxT("This line contains tabs:\tFirst tab\tSecond tab\tThird tab"));