Home » U++ Library support » TabCtrl » TabBar broken makeactive behaviour
TabBar broken makeactive behaviour [message #33414] |
Tue, 02 August 2011 12:06 |
 |
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;
}
|
|
|
Goto Forum:
Current Time: Tue Apr 29 09:28:13 CEST 2025
Total time taken to generate the page: 0.00970 seconds
|