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 » Menus&Toolbars » ToolBar as Ctrl not as Frame [BUG?]
Re: ToolBar as Ctrl not as Frame [BUG?] [message #6066 is a reply to message #6042] Sun, 29 October 2006 20:39 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, this way of adding items works only for (popup) menu. ToolBar needs to be Set:

void ToolBarAsCtrl::MyBar(Bar& tb)
{
	tb.Add("Test",ToolBarImg::heart(),THISBACK(DoNothing));
}

ToolBarAsCtrl::ToolBarAsCtrl()
{
	CtrlLayout(*this, "Window title");
	tb.SetRect(10,10,200,50);
	Add(tb);
	tb.Set(THISBACK(MyBar));
	//in 3 seconds you will see the button
//	SetTimeCallback(3000,THISBACK(ShowToolBarButtons));
}


(hopefully, I am finishing Bar docs right now...)

Mirek
 
Read Message icon5.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to disable focusing menu using TAB key
Next Topic: update state of a toolbar icon
Goto Forum:
  


Current Time: Mon Apr 29 11:49:18 CEST 2024

Total time taken to generate the page: 0.02976 seconds