Improve support for TABs in wxListBox under MSW
Always set the LB_USETABSTOPS style flag to achieve behaviour more compatible with other platforms and expand TABs to align them at tab stops positioned at every 8 characters. Also add MSW-specific MSWSetTabStops() method allowing to customize tab stops. Update the documentation and the sample to demonstrate using TABs. Closes https://github.com/wxWidgets/wxWidgets/pull/1789
This commit is contained in:
committed by
Vadim Zeitlin
parent
ebe7816516
commit
d1553c63ed
@@ -337,7 +337,7 @@ void ListboxWidgetsPage::CreateContent()
|
||||
|
||||
wxSizer *sizerRow = new wxBoxSizer(wxHORIZONTAL);
|
||||
btn = new wxButton(this, ListboxPage_Add, "&Add this string");
|
||||
m_textAdd = new wxTextCtrl(this, ListboxPage_AddText, "test item 0");
|
||||
m_textAdd = new wxTextCtrl(this, ListboxPage_AddText, "test item \t0");
|
||||
sizerRow->Add(btn, 0, wxRIGHT, 5);
|
||||
sizerRow->Add(m_textAdd, 1, wxLEFT, 5);
|
||||
sizerMiddle->Add(sizerRow, 0, wxALL | wxGROW, 5);
|
||||
@@ -619,7 +619,7 @@ void ListboxWidgetsPage::OnButtonAdd(wxCommandEvent& WXUNUSED(event))
|
||||
if ( !m_textAdd->IsModified() )
|
||||
{
|
||||
// update the default string
|
||||
m_textAdd->SetValue(wxString::Format("test item %u", ++s_item));
|
||||
m_textAdd->SetValue(wxString::Format("test item \t%u", ++s_item));
|
||||
}
|
||||
|
||||
m_lbox->Append(s);
|
||||
|
Reference in New Issue
Block a user