Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Valor

Descrição

1

Alinhamento horizontal à esquerda

2

Alinhamento horizontal à direita

4

Alinhamento horizontal ao centro

32

Alinhamento vertical ao topo

64

Alinhamento vertical ao centro

128

Alinhamento horizontal vertical à base

Exemplos

Bloco de código
languagecpp
themeEclipse
linenumberstrue
collapsefalse
#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

...