Histórico da Página
...
Bloco de código | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
#include "TOTVS.CH" #define LAYOUT_ALIGN_LEFT 1 #define LAYOUT_ALIGN_RIGHT 2 #define LAYOUT_ALIGN_HCENTER 4 #define LAYOUT_ALIGN_TOP 32 #define LAYOUT_ALIGN_BOTTOM 64 #define LAYOUT_ALIGN_VCENTER 128 function u_ExAddGLyt() oWnd:= TWindow():New(0, 0, 550, 700, "Exemplo AddInLayout", NIL, NIL, NIL, NIL, NIL, NIL, NIL,; CLR_BLACK, CLR_WHITE, NIL, NIL, NIL, NIL, NIL, NIL, .T. ) oLayout1:= tGridLayout():New(oWnd,CONTROL_ALIGN_ALLCLIENT,0,0) oLayout1:SetColor(,CLR_BLUE) oTButton1 := TButton():New( 0, 0, "Botão 01", oLayout1,{||alert("Botão 01")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oTButton2 := TButton():New( 0, 0, "Botão 02", oLayout1,{||alert("Botão 02")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oTButton3 := TButton():New( 0, 0, "Botão 03", oLayout1,{||alert("Botão 03")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oLayout1:addInLayout(oTButton1, 1, 1, , ,LAYOUT_ALIGN_TOP) oLayout1:addInLayout(oTButton2, 1, 2, , ,LAYOUT_ALIGN_VCENTER) oLayout1:addInLayout(oTButton3, 1, 3, , ,LAYOUT_ALIGN_BOTTOM) oTButton4 := TButton():New( 0, 0, "Botão 04", oLayout1,{||alert("Botão 04")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oLayout1:addInLayout(oTButton4, 2, 1, , 3) oTButton5 := TButton():New( 0, 0, "Botão 05", oLayout1,{||alert("Botão 05")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oTButton6 := TButton():New( 0, 0, "Botão 06", oLayout1,{||alert("Botão 06")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oLayout1:addInLayout(oTButton5, 3, 1, ,2) oLayout1:addInLayout(oTButton6, 3, 3) oTButton7 := TButton():New( 0, 0, "Botão 07", oLayout1,{||alert("Botão 07")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oTButton8 := TButton():New( 0, 0, "Botão 08", oLayout1,{||alert("Botão 08")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oTButton9 := TButton():New( 0, 0, "Botão 09", oLayout1,{||alert("Botão 09")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oLayout1:addInLayout(oTButton7, 4, 1, , , LAYOUT_ALIGN_RIGHT) oLayout1:addInLayout(oTButton8, 4, 2, 2) oLayout1:addInLayout(oTButton9, 4, 3, , , LAYOUT_ALIGN_LEFT) oTButton10 := TButton():New( 0, 0, "Botão 10", oLayout1,{||alert("Botão 10")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oTButton11 := TButton():New( 0, 0, "Botão 11", oLayout1,{||alert("Botão 11")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oLayout1:addInLayout(oTButton10, 5, 1) oLayout1:addInLayout(oTButton11, 5, 3) oWnd:Activate() return |
Resultado do exemplo
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas