Estou com o seguinte problema, quando eu mando executar o primeiro menu o sistema efetua a criação na janela principal até ai tudo ok, porém quando clico no botão de "procedimento" que efetua a criação do 3 menu, eu não consigo criar um novo menu na janela principal, abaixo segue o código que estou usando para criar as janelas.
Code: Select all
DEFINE WINDOW oERP FROM 4, 4 TO 25, 75 TITLE oSis:_sistema
MenuRibbonERP()
ACTIVATE WINDOW oERP MAXIMIZED
////////////////////////////
static function MenuRibbonERP()
DEFINE RIBBONBAR oRBar WINDOW oERP;
PROMPT 'Tabelas', ;
'Custo', ;
'Orçamento', ;
'Vendas', ;
'Contas a Pagar', ;
'Contas a Receber', ;
'Produção', ;
'Documentos', ;
'Contratos', ;
'Bancos,', ;
'Estoque' HEIGHT 140 TOPMARGIN 25
oRBar:nLeftMargin = 01
oRBar:CalcPos()
ADD GROUP oGr1 RIBBON oRBar TO OPTION 1 width 1000
@ 16, 05 ADD BUTTON oBtn11 GROUP oGr1 SIZE 80, 72 PROMPT " &Tabelas " round ;
Action Menu_Tab_1()
@ 16, 85 ADD BUTTON oBtn1 GROUP oGr1 SIZE 80, 72 PROMPT " &Relatório " round ;
action nil
@ 16, 165 ADD BUTTON oBtn13 GROUP oGr1 SIZE 80, 72 PROMPT " &Procedimento " round ;
action Menu_Tab_3()
@ 16, 245 ADD BUTTON oBtn15 GROUP oGr1 SIZE 80, 72 PROMPT " &Usuário " round ;
action nil
@ 16, 325 ADD BUTTON oBtn16 GROUP oGr1 SIZE 80, 72 PROMPT " S&enha " round ;
action nil
@ 16, 405 ADD BUTTON oBtn17 GROUP oGr1 SIZE 80, 72 PROMPT " &Sair " round ;
action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr2 RIBBON oRBar TO OPTION 2 width 1000
@ 16, 890 ADD BUTTON oBtn1 GROUP oGr2 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr3 RIBBON oRBar TO OPTION 3 width 1000
@ 16, 890 ADD BUTTON oBtn1 GROUP oGr3 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr4 RIBBON oRBar TO OPTION 4 width 1000
@ 16, 890 ADD BUTTON oBtn4 GROUP oGr4 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr5 RIBBON oRBar TO OPTION 5 width 1000
@ 16, 890 ADD BUTTON oBtn5 GROUP oGr5 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr6 RIBBON oRBar TO OPTION 6 width 1000
@ 16, 890 ADD BUTTON oBtn6 GROUP oGr6 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr7 RIBBON oRBar TO OPTION 7 width 1000
@ 16, 890 ADD BUTTON oBtn7 GROUP oGr7 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr8 RIBBON oRBar TO OPTION 8 width 1000
@ 16, 890 ADD BUTTON oBtn8 GROUP oGr8 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr9 RIBBON oRBar TO OPTION 9 width 1000
@ 16, 890 ADD BUTTON oBtn9 GROUP oGr9 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr10 RIBBON oRBar TO OPTION 10 width 1000
@ 16, 890 ADD BUTTON oBtn10 GROUP oGr10 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
ADD GROUP oGr11 RIBBON oRBar TO OPTION 11 width 1000
@ 16, 890 ADD BUTTON oBtn11 GROUP oGr11 SIZE 80, 72 PROMPT " Sair " action sai_ERP() BITMAP "LOGOUT"
*********************
Function Menu_Tab_1
local oWnd
local oVmenu
local oItem
local oIcon
DEFINE WINDOW oWnd TITLE "VistaMenu"
oVMenu := TVistaMenu():New( 100, 100, 100, 100, oERP )
oVMenu:nColumns := 1
oVMenu:nType := 2
// Primeiro Menu
oItem := oVMenu:AddItem( "Tabelas ", "" )
oItem:AddItem( "Ramo de Atividades",,;
{ | o | o := ERP_AA() } )
oItem:AddItem( "Fornecedores",,;
{ | o | o := ERP_AB() } )
oItem:AddItem( "Clientes",,;
{ | o | o := ERP_AC() } )
oWnd:oClient := oVMenu
ACTIVATE WINDOW oWnd On Init (oWnd:Minimize(),oWnd:End())
return 0
*********************
Function Menu_Tab_3
local oWnd
local oVmenu
local oItem
local oIcon
DEFINE WINDOW oWnd TITLE "VistaMenu"
oVMenu := TVistaMenu():New( 100, 100, 100, 100, oErp )
oVMenu:nColumns := 1
oVMenu:nType := 2
// Primeiro Menu
oItem := oVMenu:AddItem( "Procedimentos Auxiliares", "" )
oItem:AddItem( "Cadastro de Perfil",,;
{ | o | o := ERP_OA() } )
oItem:AddItem( "Atualizar preço de Venda",,;
{ | o | o := ERP_OB() } )
oWnd:oClient := oVMenu
ACTIVATE WINDOW oWnd On Init (oWnd:Minimize(),oWnd:End())
return 0
Márcio Pinheiro Varjão
DECLA TECNOLOGIA
xHB build 1.2.1 (SimpLex) & BCC 5.82 & FW 11.12 / Pelles C 6.50.8