wxGrid how to change the font size 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
palikem
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 28, 2017 9:33 am
Location: Slovensko

wxGrid how to change the font size

Post by palikem »

Hello, I have such a table
I can not change the font size in col label.
I have tried different values in Tabulka->SetFont(wxFont(23, wxSWISS, wxNORMAL, wxNORMAL, false, _("MS Sans Serif")))
But the result is still the same, the font size does not change :oops:

Code: Select all

	Tabulka = new wxGrid(Calibration, ID_TABULKA, wxPoint(540, 70), wxSize(162, 360));
	Tabulka->SetFont(wxFont(23, wxSWISS, wxNORMAL, wxNORMAL, false, _("MS Sans Serif")));
	Tabulka->SetDefaultColSize(80);
	Tabulka->SetDefaultRowSize(40);
	Tabulka->SetRowLabelSize(1);
	Tabulka->SetColLabelSize(40);
	Tabulka->CreateGrid(8,2,wxGrid::wxGridSelectCells);
In cells can change the font

Code: Select all

for(a=0; a<= 7; ++a){
	for(b=0; b<=1; ++b){
        	Tabulka->SetCellFont(a, b, wxFont(pismo8, wxSWISS, wxNORMAL, wxNORMAL, false, _("MS Sans Serif")));
        }
}
Windows 7.
wxDev-C++ 7.4.2.569
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxGrid how to change the font size

Post by doublemax »

Use the source, Luke!
palikem
Experienced Solver
Experienced Solver
Posts: 69
Joined: Sat Oct 28, 2017 9:33 am
Location: Slovensko

Re: wxGrid how to change the font size

Post by palikem »

thanks doublemax.
Post Reply