+void RichTextFrame::OnTabStops(wxCommandEvent& WXUNUSED(event))
+{
+ wxString tabsStr = wxGetTextFromUser
+ (
+ _("Please enter the tab stop positions in tenths of a millimetre, separated by spaces.\nLeave empty to reset tab stops."),
+ _("Tab Stops"),
+ wxEmptyString,
+ this
+ );
+
+ wxArrayInt tabs;
+
+ wxStringTokenizer tokens(tabsStr, _T(" "));
+ while (tokens.HasMoreTokens())
+ {
+ wxString token = tokens.GetNextToken();
+ tabs.Add(wxAtoi(token));
+ }
+
+ wxTextAttr attr;
+ attr.SetTabs(tabs);
+
+ long start, end;
+ m_textCtrl->GetSelection(& start, & end);
+ m_textCtrl->SetStyle(start, end, attr);
+
+ m_currentPosition = -1;
+}
+