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 » [PROPOSAL] Adding GetCtrlGroup() method to TabBarCtrl.
[PROPOSAL] Adding GetCtrlGroup() method to TabBarCtrl. [message #56686] Sat, 03 April 2021 01:10 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1206
Registered: August 2007
Senior Contributor
Hi,

Sometimes it is useful to get or inspect all the ctrls belonging to a specific tab group (e.g. for batch-updates, etc.).
Unfortunately, I couldn't find a method suitable for this task.
And to this end, I propose adding the following method to TabBarCtrl:

Vector<Ctrl*> TabBarCtrl::GetCtrlGroup(const String& group)
{
	auto sCheckMatch = [group](const TabBar::Tab& t) { return t.group == group; };

	Vector<Ctrl*> v;
	for(int i : FindAll(tabs, sCheckMatch)) {
		Ctrl *c = GetCtrl(tabs[i].key);
		if(c) v.Add(c);
	}

	return pick(v);
}


Best regards,
Oblivion


 
Read Message
Read Message
Read Message
Previous Topic: TabCtrl related question
Next Topic: How to dynamically add remove tabs
Goto Forum:
  


Current Time: Thu May 15 14:40:34 CEST 2025

Total time taken to generate the page: 0.02870 seconds