Leftmost Column on a Grid? and Default Scrollbars.

-Patrick CaptainMorganRawks at gmail.com
Sun Jul 29 20:53:28 PDT 2007


Problem #1:
I am having some issues understanding this or what I am not doing correctly.

The images I have included show an app that builds a grid that is 500 x 
500, please see the code after the pictures for how it is built. I am 
trying to disable the scrollbar which appears upon application start 
shown in the first picture.

http://img224.imageshack.us/img224/8658/71750339bw4.jpg

This picture shows how far the whitespace and scrollbar actually 
extends. I don't understand why it's extending like that if I've set the 
grid to a fixed width and height.
http://img524.imageshack.us/img524/1548/90966670sm9.jpg

This last picture shows that the scrollbar disappears after any cell is 
brought to focus, it now stays gone for the rest of the life of the 
program execution.
http://img408.imageshack.us/img408/5502/91117564jp7.jpg

CODE:
/** Initialize the playing surface. */
void Frame::CreateGrid() {
 
  grid = new wxGrid( this,
                     wxID_ANY,
                     wxPoint( 0, 0 ),
                     wxSize( 500, 500 ) );
  grid->CreateGrid(8, 8);
 
  // disable the default dragging ability to
  //  give it a slightly more board feel,
  //  rather than an Excel feel
  grid->DisableDragColSize();
  grid->DisableDragRowSize();
 
  grid->SetDefaultColSize(50, false);
  grid->SetDefaultRowSize(50, false);
//  grid->EnableScrolling(false, false);
//  grid->Fit();
}

Might someone kindly explain to me why this happening and if possible 
assist in accomplishing what I am trying to get?

Problem #2:
In the pictures above you can the see the default left hand column which 
lists the number 1-8. Is this column at all editable? I wish to change 
its width for one thing and maybe the background too. Can you provide 
any suggestions?

Thank you for your time
-Patrick





More information about the wx-users mailing list