wxGrid: Column Separator/Divider Width?

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
Rytz
Earned a small fee
Earned a small fee
Posts: 21
Joined: Wed May 17, 2006 10:27 pm

wxGrid: Column Separator/Divider Width?

Post by Rytz » Sat Jul 31, 2021 1:46 am

Hi:

wxWidgets 3.1.5

I was looking for a way to change the column separator size and kinda lol'ed when I found this in the source (headerctrlg.cpp):

Code: Select all

// TODO: don't hardcode sensitivity
const int separatorClickMargin = FromDIP(8);
I assume that, outside of modifying the source, a way to set the separator size is not available?

No big deal to make the change in the source. Just wanted to confirm.

Thanks!

Rytz
Earned a small fee
Earned a small fee
Posts: 21
Joined: Wed May 17, 2006 10:27 pm

Re: wxGrid: Column Separator/Divider Width?

Post by Rytz » Sat Jul 31, 2021 2:57 am

I had the wrong spot in the above post. The real culprit was here in "include\wx\generic\grid.h":

Code: Select all

#define WXGRID_LABEL_EDGE_ZONE                 2

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5309
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: wxGrid: Column Separator/Divider Width?

Post by ONEEYEMAN » Sat Jul 31, 2021 1:20 pm

Hi,
What wx version do you use?
Can you confirm it with grid sample?
Also try it with wx Git master...

Thank you.

Rytz
Earned a small fee
Earned a small fee
Posts: 21
Joined: Wed May 17, 2006 10:27 pm

Re: wxGrid: Column Separator/Divider Width?

Post by Rytz » Sat Jul 31, 2021 7:08 pm

ONEEYEMAN wrote:
Sat Jul 31, 2021 1:20 pm
Hi,
What wx version do you use?
Can you confirm it with grid sample?
Also try it with wx Git master...

Thank you.
wxWidgets 3.1.5
I can't provide a demo but increasing WXGRID_LABEL_EDGE_ZONE will increase the width for separator detection on column headers, which is exactly what I wanted. I find 5 to be preferable.

Post Reply