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   |
 |
mirek
Messages: 14255 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
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 15:12:34 CEST 2025
Total time taken to generate the page: 0.00335 seconds
|