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: 42
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: 12124
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: 42
Registered: April 2012
Member
Hi Mirek,

That did the job.

Many thanks.
Previous Topic: trouble with tabs
Goto Forum:
  


Current Time: Fri Dec 13 07:12:25 CET 2019

Total time taken to generate the page: 0.01196 seconds