Problems with wxListCtrl in windows.

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
setaseta43
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Sep 19, 2018 10:46 am

Problems with wxListCtrl in windows.

Post by setaseta43 »

Problems with wxListCtrl in windows.

With version 3.11 on windows I have problems repainting wxListCtrl.
I have made a program that I compile in Linux and Windows. Compile well.
The problem that when I compile with the library 2.8.12 the repainting works well.
If I compile it in library 3.1.1 the repainting is not correct.

The code is:

MyList = new wxListCtrl (this, ID_LISTCTRL1, wxPoint (16,16), wxSize (496,232), wxLC_REPORT, wxDefaultValidator, _T ("ID_LISTCTRL1"));
wxFont MyListaFont (8, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, _T ("Sans"), wxFONTENCODING_DEFAULT);
MyList-> SetFont (MyListFont);

why?
errorList.png
errorList.png (20.09 KiB) Viewed 704 times
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: Problems with wxListCtrl in windows.

Post by PB »

Does this happen without setting a custom font? If so, can you reproduce the issue (with setting the exact same font as in your app) in the list sample or perhaps the minimal example similar to e.g. one here?

Perhaps it is related to your application for some reason not using the theme manifest which should be used since Windows XP? I remember somewhat similar issue popping up recently with another control in the application without a manifest. I would recommend fixing that first and see if it helps even if it hardly explains why it used to work before.
setaseta43
In need of some credit
In need of some credit
Posts: 2
Joined: Wed Sep 19, 2018 10:46 am

Re: Problems with wxListCtrl in windows.

Post by setaseta43 »

Hello

As you can see in the image, the drawing of all the texts of the items is fine and they are redrawn well.
The operation of the program is correct.
The problem is the rest of the space that does not have text, it is left with pieces of the different windows that pass over the wxListCtrl.
The tests are in Windows 7.

Greetings.
Juan
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: Problems with wxListCtrl in windows.

Post by PB »

Sorry, but you did not address any of the questions asked in my previous post. The answers to those could have provided a hint what is wrong.

The issue, i.e., the list ctrl not being repainted properly was pretty clear from the screenshot in the first post...

I assume you provided all relevant code regarding the list ctrl. TBH, your application looks is quite odd, aside from it not being themed, it uses absolute coordinates for the controls and does not use a wxPanel as the main container of child controls in a wxFrame. But these probably have no effect, but it is hard to tell.
Post Reply