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:
Artur Sochirca
2020-04-13 16:49:38 +03:00
committed by Vadim Zeitlin
parent ebe7816516
commit d1553c63ed
4 changed files with 38 additions and 7 deletions

View File

@@ -128,6 +128,10 @@ public:
// extent of all strings is used. In any case calls InvalidateBestSize()
virtual void SetHorizontalExtent(const wxString& s = wxEmptyString);
// This is a wrapper for LB_SETTABSTOPS message and takes tab stops in
// dialog units, with the same conventions as LB_SETTABSTOPS uses.
virtual bool MSWSetTabStops(const wxVector<int>& tabStops);
// Windows callbacks
bool MSWCommand(WXUINT param, WXWORD id) wxOVERRIDE;
WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const wxOVERRIDE;