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 » Why does this code hang?
Why does this code hang? [message #45260] Sun, 25 October 2015 12:59 Go to previous message
slashupp is currently offline  slashupp
Messages: 231
Registered: July 2009
Experienced Member
(debian 64-bit)

Based on reply by unodgs: http:// www.ultimatepp.org/forums/index.php?t=msg&th=6809&go to=36746&#msg_36746
The following code hangs when a tab is clicked:

#include <CtrlLib/CtrlLib.h>
#include <TabBar/TabBar.h> //must add package TabBar

using namespace Upp;

struct test_tabbar : public TopWindow 
{
	typedef test_tabbar CLASSNAME;
	TabBar TB;
	test_tabbar();
	void ontab();
	
};

test_tabbar::test_tabbar()
{
	Title("test_tabbar");
	Add(TB);
	TB.HSizePosZ(0, 0).VSizePosZ(0, 0);
	TB.AddKey("one", "tab one");
	TB.AddKey("two", "tab two");
	TB.AddKey("three", "tab three");
	TB.WhenAction = THISBACK(ontab);
}

void test_tabbar::ontab()
{
	PromptOK(TB.Get(TB.GetKey(TB.GetHighlight())).ToString());
}

GUI_APP_MAIN
{
	test_tabbar().Run();
}

[Updated on: Sun, 25 October 2015 13:00]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Tabs at bottom of TabCtrl
Next Topic: How can I change the TabCtrl font size and weight?
Goto Forum:
  


Current Time: Fri Apr 26 11:32:08 CEST 2024

Total time taken to generate the page: 0.02883 seconds