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  |
Oblivion
Messages: 1214 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
Github page: https://github.com/ismail-yilmaz
Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
|
|
|
|
|
Goto Forum:
Current Time: Tue Jul 01 12:22:50 CEST 2025
Total time taken to generate the page: 0.04139 seconds
|