[Fwd: Re: Leftmost Column on a Grid? and Default Scrollbars.]

-Patrick CaptainMorganRawks at gmail.com
Mon Jul 30 07:14:19 PDT 2007


-Patrick wrote:
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Leftmost Column on a Grid? and Default Scrollbars.
> From:
> Vadim Zeitlin <vadim at wxwidgets.org>
> Date:
> Mon, 30 Jul 2007 08:44:34 +0200
> To:
> wx-users at lists.wxwidgets.org
>
> To:
> wx-users at lists.wxwidgets.org
>
>
> On Sun, 29 Jul 2007 23:53:28 -0400 -Patrick <CaptainMorganRawks at gmail.com> wrote:
>
> P> Problem #1:
> P> I am having some issues understanding this or what I am not doing correctly.
>
>  Which version of wx do you use? If it's anything less than 2.8.4, please
> upgrade as there were fixes to grid sizing in it.
>   
After looking in /usr/local/include I found the directory labelled 
wx-2.8    - I gather this is outdated and should say wx-2.8.4 ? How do I 
check which version I am using and could you provide me a link with 
upgrade instructions, or do I simply download and install the updated 
library as I did the first time?

> P> /** Initialize the playing surface. */
> P> void Frame::CreateGrid() {
> P>  
> P>   grid = new wxGrid( this,
> P>                      wxID_ANY,
> P>                      wxPoint( 0, 0 ),
> P>                      wxSize( 500, 500 ) );
> P>   grid->CreateGrid(8, 8);
> P>  
> P>   // disable the default dragging ability to
> P>   //  give it a slightly more board feel,
> P>   //  rather than an Excel feel
> P>   grid->DisableDragColSize();
> P>   grid->DisableDragRowSize();
> P>  
> P>   grid->SetDefaultColSize(50, false);
> P>   grid->SetDefaultRowSize(50, false);
> P> //  grid->EnableScrolling(false, false);
> P> //  grid->Fit();
> P> }
>
>  It's better to call Fit() than to fix the grid size yourself -- you won't
> have any extra white space left like this.
>
>   
I do typically have that line uncommented at grid->Fit(); but it doesn't 
seem to have any effect.
> P> Problem #2:
> P> In the pictures above you can the see the default left hand column which 
> P> lists the number 1-8. Is this column at all editable?
>
>  You can change the label, of course. If you want to change its appearance
> I think you need to override wxGrid::DrawRow/ColLabel().
>
>  Regards,
> VZ
>
>   
Ill look into that,  Thank you for your help




More information about the wx-users mailing list