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 » U++ Library support » TabCtrl » How do I change TabCtrl tab size
How do I change TabCtrl tab size [message #52673] Fri, 08 November 2019 17:52 Go to next message
awksed is currently offline  awksed
Messages: 61
Registered: April 2012
Member
How do I change TabCtrl tab size (height).

I can enlarge the tab label font size (with e.g. tab.Add("\1[ [ [4!Arial! Test]]]"); ) but the tab remains the same height and the font is drawn too high.

I am increasing the size of my app controls for fat fingers on tablets.

Thanks.
Re: How do I change TabCtrl tab size [message #52745 is a reply to message #52673] Sat, 16 November 2019 11:09 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
You can define your own Style, change tabheight.

GUI_APP_MAIN
{
	static TabCtrl::Style big_tab = TabCtrl::StyleDefault();
	ONCELOCK {
		big_tab.tabheight = Zy(100);
	}

	TopWindow win;
	TabCtrl tab;
	tab.SetStyle(big_tab);
	tab.Add("Test");
	win.Add(tab.SizePos());
	win.Run();
}


(Note that Style has to be static or global).

Alternatively, you can do that for all TabCtrls:

GUI_APP_MAIN
{
	TabCtrl::Style& s = TabCtrl::StyleDefault().Write();
	s.tabheight = Zy(100);

	TopWindow win;
	TabCtrl tab;
	tab.Add("Test");
	win.Add(tab.SizePos());
	win.Run();
}


Mirek
Re: How do I change TabCtrl tab size [message #52796 is a reply to message #52745] Wed, 27 November 2019 17:27 Go to previous message
awksed is currently offline  awksed
Messages: 61
Registered: April 2012
Member
Hi Mirek,

That did the job.

Many thanks.
Previous Topic: trouble with tabs
Next Topic: TabCtrl related question
Goto Forum:
  


Current Time: Thu Apr 18 06:32:32 CEST 2024

Total time taken to generate the page: 0.02979 seconds