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 |
|
Ìàêå 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
|
|
|
Goto Forum:
Current Time: Wed May 08 22:05:15 CEST 2024
Total time taken to generate the page: 0.02523 seconds
|