Jump to content
Fivewin Brasil

TxBrowse() com Checkbox


jfaguiar

Recommended Posts

Boa noite amigos.

Alguém tem algum exemplo de edição de checkbox numa coluna de TxBrowse()

Desde já gradeço as colaborações. 

      oBrw := TxBrowse():New(oDlg)
      oBrw:nTop  := 40 // 8
      oBrw:nLeft := 4
      oBrw:nbottom := 135
      oBrw:nRight:= nWidthLb + 3 // 6 em pixel
      //oBrw:nTop  := nTopBrw //  2.5     //  160
      //oBrw:nLeft := nLeftBrw  //   0.700    // em pixel
      //oBrw:nbottom := nBottomBrw //  200   // 225

      oBrw:nColDividerStyle := LINESTYLE_LIGHTGRAY // LINESTYLE_BLACK por array
      oBrw:nRowDividerStyle := LINESTYLE_LIGHTGRAY // LINESTYLE_BLACK
      oBrw:nMarqueeStyle    := MARQSTYLE_HIGHLCELL
      oBrw:cAlias := Alias()
      oBrw:lAllowColSwapping   := .f.
      oBrw:lColDividerComplete := .t.
      oBrw:lHScroll            := .f.
      oBrw:lFastEdit           := .t.
      //oBrw:nFreeze             :=  9
      oBRW:nRowHeight:= 18
      //
      aCols := oBrw:AddCol()
      oBrw:aCols[1]:bStrData     := { || TBALUNO->CODIGO}
      oBrw:aCols[1]:cHeader      := "Código"
      oBrw:aCols[1]:bClrEdit     := oBrw:bClrStd
      oBrw:aCols[1]:nWidth       := 100
      //

      aCols := oBrw:AddCol()
      oBrw:aCols[1]:bStrData     := { || TBALUNO->DATANAS}
      oBrw:aCols[1]:cHeader      := "Data Nascimento"
      oBrw:aCols[1]:bClrEdit     := oBrw:bClrStd
      oBrw:aCols[1]:bOnPostEdit  := { | oCol, xVal, nKey | If( nKey == VK_RETURN, TBALUNO->DATANAS := xVal,) }
      oBrw:aCols[1]:nEditType    := EDIT_GET
      oBrw:aCols[1]:nWidth       := 110
       //
      aCols := oBrw:AddCol()
      oBrw:aCols[3]:bStrData     := { || TBALUNO->POSGRAD}   // Este aqui é um campo lógico
      oBrw:aCols[3]:cHeader      := "Pós Grad"
      oBrw:aCols[3]:bClrEdit     := oBrw:bClrStd
      oBrw:aCols[3]:bOnPostEdit  :=  { | oCol, xVal, nKey | If( nKey == VK_RETURN, TBALUNO->POSGRAD := xVal,) }
      oBrw:aCols[3]:nEditType    := EDIT_GET
      oBrw:aCols[3]:nWidth       := 120

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...