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 » Disappearing tabs in TabCtrl
Disappearing tabs in TabCtrl [message #23527] Tue, 27 October 2009 14:40 Go to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
Hi,

I found funny problem with TabCtrl. When I maximize and minimize TabDlg example program when the second tab is selected, first tab "disappears" (see attached screenshot).

Steps to trigger this behavior:
1. Add MinimizeBox and MaximizeBox to TabDlg example program.
GUI_APP_MAIN
{
	TabDlg dlg;
	dlg.MinimizeBox().MaximizeBox();
	WithTab1Layout<ParentCtrl> tab1;
	WithTab2Layout<ParentCtrl> tab2;
	dlg(tab1, "Tab1")(tab2, "Tab2")
	   .OKCancel()
	   .Title("Tab dialog");
	dlg.Run();
}

2. Run it, switch to the second tab.
3. Maximize window
4. Minimize it to task bar.
5. Restore window (first tab should be gone).
Re: Disappearing tabs in TabCtrl [message #23528 is a reply to message #23527] Tue, 27 October 2009 14:53 Go to previous messageGo to next message
cbpporter is currently offline  cbpporter
Messages: 1401
Registered: September 2007
Ultimate Contributor
Easy fix is to edit CtrLib/TabCtrl.cpp, TabCtrl::Layout and add a 'SyncTabs();' statement before the final line in that method, the one with 'Refresh();', while possibly commenting out the original call to SyncTabs in the same method.

Sorry for poor solution, this is just at 30 second glance over the source code; I don't have time right now to investigate why this is happening. You also don't need to maximize the dialog for the bug to appear; it is triggered by minimizing and the reduction of the control in size so much that it tries to bring out of view other tabs.
Re: Disappearing tabs in TabCtrl [message #23532 is a reply to message #23528] Wed, 28 October 2009 15:39 Go to previous messageGo to next message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
cbpporter wrote on Tue, 27 October 2009 14:53

Sorry for poor solution, this is just at 30 second glance over the source code;


It seems that your "poor" solution did the trick Smile. thanks.


Re: Disappearing tabs in TabCtrl [message #23554 is a reply to message #23532] Fri, 30 October 2009 20:10 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
The trick is in uppsrc now, thanks...

Mirek

[Updated on: Fri, 30 October 2009 20:11]

Report message to a moderator

Previous Topic: TabCtrl crash in debug mode when using remove method
Next Topic: Hide tab in TabCtrl
Goto Forum:
  


Current Time: Thu Mar 28 21:34:06 CET 2024

Total time taken to generate the page: 0.00965 seconds