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 » TabBar broken makeactive behaviour
TabBar broken makeactive behaviour [message #33414] Tue, 02 August 2011 12:06
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
i might be wrong, but the make active behaviour seems not to work as expected, because the active = -1 is set always and evaluates incorrectly in the if below. is this by design? if so, why

my expectation would be: with always makeactive = false, adding a tab to an empty TabBar would SetCursor the first time only, leaving it untouched when adding more tabs. which does not happen.

TabBar.cpp:1250
TabBar& TabBar::InsertKey(int ix, const Value &key, const Value &value, Image icon, String group, bool make_active)
{
	int id = InsertKey0(ix, key, value, icon, group);
	
	SortTabs0();
	MakeGroups();	
	Repos();
	active = -1; // <<<<<<<<<<<<<<<<<<<<<<<<<<<<
	if (make_active || (!allownullcursor && active < 0)) 
		SetCursor((groupsort || stacking) ? FindId(id) : ( minmax(ix, 0, tabs.GetCount() - 1)));		
	return *this;	
}
Previous Topic: How to define classes for tabs with in the tabs..
Next Topic: Can TabCtrl be created this way?
Goto Forum:
  


Current Time: Fri Jun 21 04:14:56 CEST 2024

Total time taken to generate the page: 0.02166 seconds