wxListCtrl row height Topic is solved

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
rudolfninja
Earned some good credits
Earned some good credits
Posts: 107
Joined: Tue Aug 28, 2018 1:02 pm
Location: Belarus

wxListCtrl row height

Post by rudolfninja »

Hi all,

Is it possible to set row height in wxListCtrl or spacing between rows? The problem I'm trying to solve: I've got list with rows contains images and text, but images are close to each other in vertical space and I'd like to separate them. As a solution I inserted white box around images to increase it height. It looks fine till the moment I select any row. When selecting an item in the list, the selected box doesn't 'fit' around the image:
list.png
list.png (6.86 KiB) Viewed 1369 times
So the question how to increase space between rows or how to make selection box fit around the image?

I'm using wxWidgets 3.1.1; platform is Windows but I want it to work on Linux as well.

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

Re: wxListCtrl row height

Post by PB »

Sorry for stupid question but did you try to make the image "gap" not white but transparent?
User avatar
doublemax
Moderator
Moderator
Posts: 19159
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxListCtrl row height

Post by doublemax »

Additionally, if your wxListCtrl has only one column, consider wxSimpleHtmlListBox which gives you more freedom on the visuals.

https://docs.wxwidgets.org/trunk/classw ... t_box.html
Use the source, Luke!
rudolfninja
Earned some good credits
Earned some good credits
Posts: 107
Joined: Tue Aug 28, 2018 1:02 pm
Location: Belarus

Re: wxListCtrl row height

Post by rudolfninja »

PB wrote:Sorry for stupid question
It's not the question stupid, but me =( Thanks, it solved the problem.
doublemax wrote:if your wxListCtrl has only one column, consider wxSimpleHtmlListBox which gives you more freedom on the visuals
Thanks, I'll take a look on this control
Post Reply