Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » How to set GridCtrl header font size?
How to set GridCtrl header font size? [message #32747] Sun, 05 June 2011 22:36 Go to next message
bushman is currently offline  bushman
Messages: 134
Registered: February 2009
Experienced Member
Pls,

How to set a GridCtrl header font size?
Iīve tried
 mygrid.AddColumn("my grid col").SetFont(Arial().Height(8));

but it didnīt work. It sets the font for added rows, but does nothing to the header font. Is there a getter to retrieve a GridCtrl header and set its font?

tks.
Re: How to set GridCtrl header font size? [message #32764 is a reply to message #32747] Tue, 07 June 2011 08:08 Go to previous messageGo to next message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

Unfortunately there is now easy way to do that now. What you can do is to provide your own display class for grid and override PaintFixed method. But I'll try to add SetHeaderFont soon.
Re: How to set GridCtrl header font size? [message #32967 is a reply to message #32747] Sun, 26 June 2011 13:57 Go to previous message
unodgs is currently offline  unodgs
Messages: 1366
Registered: November 2005
Location: Poland
Ultimate Contributor

kropniczki wrote on Sun, 05 June 2011 16:36

Pls,

How to set a GridCtrl header font size?
Iīve tried
mygrid.AddColumn("my grid col").SetFont(Arial().Height(8));



I've added SetHeaderFont(). Try this code:
mygrid.AddColumn("my grid col").SetHeaderFont(Arial(25));
mygrid.SetRowHeight(0, 40);

I'll add respecing Height() method leater.
Previous Topic: tracking GridCtrl selection
Next Topic: Database with several windows
Goto Forum:
  


Current Time: Fri Mar 29 12:12:36 CET 2024

Total time taken to generate the page: 0.01525 seconds