wxGrid header - how to remove Topic is solved

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
warlock24
In need of some credit
In need of some credit
Posts: 8
Joined: Sat Mar 17, 2007 12:43 pm
Contact:

wxGrid header - how to remove

Post by warlock24 »

hi

How can I remove header row and first column from wxGrid? :roll:
Peterj
Knows some wx things
Knows some wx things
Posts: 38
Joined: Mon Nov 14, 2005 6:48 pm
Location: Australia

Post by Peterj »

Setting the header row height to zero and the column row width to zero will probably be the easiest.
Using Win XP, Dev C++ 4.9.9.2 wx-beta 6.9
leekeanloon
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon Aug 13, 2007 3:07 am

Post by leekeanloon »

Hi, may I know how to set the header col size? I try using wxGrid->SetColSize(-1,0);

to hide the header column, but index 0 refer to the first column while -1 does not refer to the header column.

thanks.
Peterj
Knows some wx things
Knows some wx things
Posts: 38
Joined: Mon Nov 14, 2005 6:48 pm
Location: Australia

Post by Peterj »

Hi, to hide the label header row, use:

Code: Select all

 WxGrid1->SetRowLabelSize(0);
to hide the label column use:

Code: Select all

 WxGrid1->SetColLabelSize(0);
Regards,

Peter
Using Win XP, Dev C++ 4.9.9.2 wx-beta 6.9
leekeanloon
Earned a small fee
Earned a small fee
Posts: 13
Joined: Mon Aug 13, 2007 3:07 am

Post by leekeanloon »

it works. thank you.
Post Reply