Home » Community » Newbie corner » MainMenu problem
MainMenu problem [message #35133] |
Mon, 16 January 2012 15:46 |
idkfa46
Messages: 155 Registered: December 2011
|
Experienced Member |
|
|
Hy guys,
I have a problem adding mainmenu to my little program.
Atm i dont receive any error compiling it but i cant see it
this is my code
main.cpp
#include "prova2.h"
prova2::prova2()
{
CtrlLayout(*this, "Programma di prova");
Sizeable().Zoomable();
menu.Set(THISBACK(MainMenu));
CtrlLayout(modify); //Layout tab
CtrlLayout(search);
CtrlLayout(volume);
tab.Add(modify, "Tab1"); //aggingi tab con nome
tab.Add(search, "Tab2");
tab.Add(volume, "Tab3");
// you must add a callback on x or y fields update
x <<= THISBACK( calcolo) ;
y <<= THISBACK( calcolo) ;
}
void prova2::FileMenu(Bar& bar)
{
bar.Add("Quit", THISBACK(Quit));
}
void prova2::MainMenu(Bar& bar)
{
bar.Add("File", THISBACK(FileMenu));
}
void prova2::Quit()
{
Break();
}
....
GUI_APP_MAIN
{
prova2().Run();
}
prova.h
#ifndef _prova2_prova2_h
#define _prova2_prova2_h
#include <CtrlLib/CtrlLib.h>
using namespace Upp;
#define LAYOUTFILE <prova2/prova2.lay>
#include <CtrlCore/lay.h>
class prova2 : public Withprova2Layout<TopWindow> {
WithModifyLayout<ParentCtrl> modify;
WithSearchLayout<ParentCtrl> search;
WithVolumeLayout<ParentCtrl> volume;
MenuBar menu;
void Quit();
void FileMenu(Bar& bar);
void MainMenu(Bar& bar);
typedef prova2 CLASSNAME;
public:
prova2();
private:
void calcolo();
};
#endif
Where is my fail ?!
Regards,
Matteo
|
|
|
|
|
|
Goto Forum:
Current Time: Fri May 03 01:36:41 CEST 2024
Total time taken to generate the page: 0.04710 seconds
|