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 » Community » Newbie corner » dropdown submenu into ToolBar
Re: dropdown submenu into ToolBar [message #37825 is a reply to message #37794] Thu, 15 November 2012 17:01 Go to previous messageGo to previous message
sergeynikitin is currently offline  sergeynikitin
Messages: 748
Registered: January 2008
Location: Moscow, Russia
Contributor

Ìàêå procedure callback with direct call Popup menu.

Toolbar code:
 bar.Add(t_("Print"),Icons::Print32(), THISBACK(PrintMenu)).Label(t_("Print"));


Dropdown Execution code:
void AnketaListDlg::PrintMenu()
{
	MenuBar bar;
	
	Sql sql;
	sql * Select(REP_ID,REP_NAME).From(REPORTS).Where(REP_TYPE == "resume").OrderBy(REP_TYPE,REP_NAME,REP_ID);
	while (sql.Fetch()){
		bar.Add((String)(sql[REP_NAME]),THISBACK2(PrintProc,sql[REP_ID],listanketa(ANK_ID)));
	}
	bar.Execute();
}


This procedure use to add Dropdown menu items from Sql table REPORTS
or you can simple add standard menu item like
bar.Add(t_("Search"),SVIcons::Find(), THISBACK(SetupQuery)).Label(t_("Search"));


SergeyNikitin<U++>( linux, wine )
{
    under( Ubuntu || Debian || Raspbian );
}

[Updated on: Thu, 15 November 2012 17:03]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: broken pick semantics
Next Topic: Frameless(true); bug, my error or ???
Goto Forum:
  


Current Time: Wed May 08 22:05:15 CEST 2024

Total time taken to generate the page: 0.02523 seconds