Classe: TMenuBar
Cria um objeto do tipo barra de menu.
TSrvObject -> TControl -> TMenuBar
A classe "TMenuBar" já é criada com o alinhamento "CONTROL_ALIGN_TOP". Quando utilizada com a classe "TWindow" a redundacia deste alinhamento retira o Objeto da area de Menu (Será apresentada uma area em branco acima do menu).
#include "TOTVS.CH"User Function TMenuBar() DEFINE DIALOG oDlg TITLE "Exemplo TMenuBar" FROM 180,180 TO 550,700 PIXEL // Monta um Menu Suspenso oTMenuBar := TMenuBar():New(oDlg) oTMenu1 := TMenu():New(0,0,0,0,.T.,,oDlg) oTMenu2 := TMenu():New(0,0,0,0,.T.,,oDlg) oTMenuBar:AddItem('Arquivo' , oTMenu1, .T.) oTMenuBar:AddItem('Relatorio', oTMenu2, .T.) // Cria Itens do Menu oTMenuItem := TMenuItem():New(oDlg,'TMenuItem 01',,,,; {||Alert('TMenuItem 01')},,'AVGLBPAR1',,,,,,,.T.) oTMenu1:Add(oTMenuItem) oTMenu2:Add(oTMenuItem) oTMenuItem := TMenuItem():New(oDlg,'TMenuItem 02',,,,; {||Alert('TMenuItem 02')},,,,,,,,,.T.) oTMenu1:Add(oTMenuItem) oTMenu2:Add(oTMenuItem) ACTIVATE DIALOG oDlg CENTERED Return
Exemplo da classe TMenuBar
Microsiga Protheus 8.11
,
Microsiga Protheus 11
,
Protheus 10
,
TOTVS Application Server 10
,
ByYou Application Server
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas