wxListCrl errornously creates first column with left alignment on windows

Robin Dunn robin at alldunn.com
Tue May 13 10:50:40 PDT 2008


Thomas Zehbe wrote:
> Am Dienstag, 13. Mai 2008 schrieb Vadim Zeitlin:
>> On Tue, 13 May 2008 08:35:00 +0200 Thomas Zehbe <tz at thomas-zehbe.de> wrote:
>>
>> TZ> This is the code wich adds two cols to a list control:
>> TZ>     mList->InsertColumn(0, _T("col1"), wxLIST_FORMAT_RIGHT, 100);
>> TZ>     mList->InsertColumn(1, _T("col2"), wxLIST_FORMAT_RIGHT, 100);
>> TZ> Using 2.8.7 on linux everything works, but using the same on windows, I
>> get TZ> the first column left aligned.
>>
>>  Is this problem reproducible in the listctrl sample?
>> VZ
> 
> Yup, it is. I changed line 468 like this:
>     //m_listCtrl->InsertColumn(0, itemCol);
>     m_listCtrl->InsertColumn(0, _T("Col1"), wxLIST_FORMAT_RIGHT, 200);
> commented out the autosize option for column 0 and got the output attached as 
> a jpg. (All done with 2.8.7, on win2k with VC6 in unicode debug build)

This has always been this way, and I expect that it is a "feature" of 
the MS ListView control that it won't change alignment of the first 
column.  I would love to be proven wrong however.

-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!



More information about the wx-users mailing list