Resizing a wxGrid's column to make grid fit client space

Volker Bartheld dr_versaeg at freenet.de
Fri Sep 14 03:00:31 PDT 2007


Hi Vadim!

> On Wed, 12 Sep 2007 14:06:39 +0200 Volker Bartheld <dr_versaeg at freenet.de> wrote:
> VB> void wxMyGrid::ResizeByCol(int col)
> VB> {
> VB>   int i, iSize=0;
> VB>   for(i=0; i<m_numCols; ++i) if(i!=col) iSize+=GetColSize(i);
> VB>   SetColSize(col, GetClientSize().GetWidth()-iSize);
> VB>   ForceRefresh();
> VB> }

On Fri, 14 Sep 2007 02:53:56 +0200, Vadim Zeitlin wrote:
>  Maybe calling Fit() would help? I never remember what exactly is the
> problem with this but I do know that the "bugs" grid in the grid sample
> does it correctly.

Thanks for your eternal patience. I'll have a look at it.


Volker

-- 
mailto:  V B A R T H E L D at G M X dot D E






More information about the wx-users mailing list