Page 1 of 1

Why my wxListCtrl style is different from the sample?

Posted: Sun Aug 10, 2008 4:57 am
by freshairfly
Hi All,

I'm a newbie of wxWidgets. I'm using wxListCtrl in report mode, and I found that the effect (header style, see pictures) of mine is different from the example (listctrl in samples folder). I can't find the what reason causes that.

My demo appliction screenshot:
Image

Example screenshot in offical release:

Image

I run these codes on Windows XP, and my demo code is like this:

Code: Select all

    long style = wxLC_REPORT | wxLC_EDIT_LABELS | wxSUNKEN_BORDER;
    wxListCtrl* pListCtrl = new wxListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, style);

    pListCtrl->InsertColumn(0, _T("First Column"));
    pListCtrl->InsertColumn(1, _T("Second Column"));
    pListCtrl->SetColumnWidth(0, 150);
    pListCtrl->SetColumnWidth(1, 150);
Any tip is welcome.

Andraw

Posted: Mon Aug 11, 2008 8:05 am
by Ugly!
Your are probably missing the Windows XP style...

From the wiki:
If project uses a resource (.rc), add the line: #define wxUSE_NO_MANIFEST 1

- i.e. the 'text' sample .rc file will look like this:

mondrian ICON "mondrian.ico"
#define wxUSE_NO_MANIFEST 1
#include "wx/msw/wx.rc"
Open your .rc file and the line:
#define wxUSE_NO_MANIFEST 1

Regards, Matías

Posted: Mon Aug 11, 2008 9:05 am
by lester
Ugly! wrote:Your are probably missing the Windows XP style...

From the wiki:
If project uses a resource (.rc), add the line: #define wxUSE_NO_MANIFEST 1

- i.e. the 'text' sample .rc file will look like this:

mondrian ICON "mondrian.ico"
#define wxUSE_NO_MANIFEST 1
#include "wx/msw/wx.rc"
Open your .rc file and the line:
#define wxUSE_NO_MANIFEST 1

Regards, Matías
but scrollbar themed

Posted: Mon Aug 11, 2008 12:57 pm
by freshairfly
Ugly! wrote:Your are probably missing the Windows XP style...

From the wiki:
If project uses a resource (.rc), add the line: #define wxUSE_NO_MANIFEST 1

- i.e. the 'text' sample .rc file will look like this:

mondrian ICON "mondrian.ico"
#define wxUSE_NO_MANIFEST 1
#include "wx/msw/wx.rc"
Open your .rc file and the line:
#define wxUSE_NO_MANIFEST 1

Regards, Matías
Matías, thanks very much!
It does work.