I have a white area extending out from under my wxGrid display as shown in the attached image. How can I keep the white area confined to within the grid and inside the units column?
wxGrid background color extends to outside of grid display
Re: wxGrid background color extends to outside of grid display
Hi,
As a workaround you can set a background color for the grid.
Or if you know how big the grid will be you can calculate its size and set it after constructing it.
Or hopefully someone else will have another (and better) idea.
As a workaround you can set a background color for the grid.
Or if you know how big the grid will be you can calculate its size and set it after constructing it.
Or hopefully someone else will have another (and better) idea.
-
- Filthy Rich wx Solver
- Posts: 235
- Joined: Fri Sep 14, 2012 8:26 am
- Location: Kontich, Belgium
- Contact:
Re: wxGrid background color extends to outside of grid display
Hi Spflanze,
To my knowledge the white area is in the grid, meaning you don't have a border on your grid. The borders you see are simply the borders of the cells. Or, you have a panel with a white background on which you placed a wxGrid. The reason why I believe it's the first and not the latter is because of the grey area on the left beneath the cells. That's the label area. And since it goes down all the way, I think your grid does also. So you could set the background for your grid to be gray, like the label area, but I prefer using white or a color - not grey - to make the distinction between the content area of the grid and the side areas like labels and titles.
regards,
Nunki
To my knowledge the white area is in the grid, meaning you don't have a border on your grid. The borders you see are simply the borders of the cells. Or, you have a panel with a white background on which you placed a wxGrid. The reason why I believe it's the first and not the latter is because of the grey area on the left beneath the cells. That's the label area. And since it goes down all the way, I think your grid does also. So you could set the background for your grid to be gray, like the label area, but I prefer using white or a color - not grey - to make the distinction between the content area of the grid and the side areas like labels and titles.
regards,
Nunki
Re: wxGrid background color extends to outside of grid display
On all the grids I have in the Properties tab all Border check boxes checked. Is this the border you are referring to?
For the grid I attached I found I was able to eliminate the undesired white area underneath by unchecking the grid's expand property. But I have other grids where this undesired white area extends to the right instead of underneath, and for which unchecking the Expand checkbox did not work to eliminate. What did work was to set each of these grids's proportion values to zero.
For the grid I attached I found I was able to eliminate the undesired white area underneath by unchecking the grid's expand property. But I have other grids where this undesired white area extends to the right instead of underneath, and for which unchecking the Expand checkbox did not work to eliminate. What did work was to set each of these grids's proportion values to zero.