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_ExAddLyt() 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. ) oLayout := tLinearLayout():New( oWnd, 0, CONTROL_ALIGN_ALLCLIENT ) oLayout:SetColor(,CLR_BLUE) oTButton1 := TButton():New( 0, 0, "Botão 01", oLayout,{||alert("Botão 01")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oTButton2 := TButton():New( 0, 0, "Botão 02", oLayout,{||alert("Botão 02")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oTButton3 := TButton():New( 0, 0, "Botão 03", oLayout,{||alert("Botão 03")}, 40,10,,,.F.,.T.,.F.,,.F.,,,.F. ) oLayout:AddInLayout(oTButton1, LAYOUT_ALIGN_RIGHT + LAYOUT_ALIGN_TOP, 20) oLayout:AddInLayout(oTButton2, ,60) oLayout:AddInLayout(oTButton3, LAYOUT_ALIGN_LEFT + LAYOUT_ALIGN_BOTTOM, 20) oWnd:Activate() return |
Resultado do exemplo
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas