Clipper On Line • Ver Tópico - Alterar dado do Browse

Alterar dado do Browse

Projeto HwGui - Biblioteca visual para Harbour/xHarbour

Moderador: Moderadores

 

Alterar dado do Browse

Mensagempor gilbertosilverio » 13 Mai 2022 10:03

Ola Amigos,

O que estou fazendo de errado?

Em uma matriz composta, o browse e alterado

#include "hwgui.ch"
Function Test()
Local oDlg, oBrw
Local aSample := { {"Alex",12} , {"Victor",13},{ "John",14} }

   INIT DIALOG oDlg TITLE "Browse array";
         AT 0, 0 SIZE 300, 230 ;
         FONT HFont():Add( "MS Sans Serif",0,-13 )

   @ 10,20 BROWSE oBrw ARRAY AUTOEDIT  SIZE 280,140 STYLE WS_BORDER + WS_VSCROLL ;
         ON SIZE ANCHOR_TOPABS + ANCHOR_LEFTABS + ANCHOR_RIGHTABS + ANCHOR_BOTTOMABS

   // hwg_CreateArList() sets the array to browse and creates columns
   // You may use oBrw:AddColumn( HColumn():New(...) ) instead to set
   // columns with necessary options.
   hwg_CreateArList( oBrw, aSample )

   // In case of using hwg_CreateArList() you may set some columns options later,
   // for example:
   oBrw:aColumns[1]:heading := "Name"
   oBrw:aColumns[2]:heading := "ANO"
   oBrw:aColumns[1]:leditable := .t.

   @ 100,180 BUTTON 'Close' SIZE 100,28 ON CLICK {|| oDlg:Close() } ;
         ON SIZE ANCHOR_LEFTABS + ANCHOR_RIGHTABS + ANCHOR_BOTTOMABS

   ACTIVATE DIALOG oDlg
Return Nil



Mais em uma matriz simples nao, Por que?

#include "hwgui.ch"
Function Test()
Local oDlg, oBrw
Local aSample := { "Alex" , "Victor",  "John" }

   INIT DIALOG oDlg TITLE "Browse array";
         AT 0, 0 SIZE 300, 230 ;
         FONT HFont():Add( "MS Sans Serif",0,-13 )

   @ 10,20 BROWSE oBrw ARRAY AUTOEDIT  SIZE 280,140 STYLE WS_BORDER + WS_VSCROLL ;
         ON SIZE ANCHOR_TOPABS + ANCHOR_LEFTABS + ANCHOR_RIGHTABS + ANCHOR_BOTTOMABS

   // hwg_CreateArList() sets the array to browse and creates columns
   // You may use oBrw:AddColumn( HColumn():New(...) ) instead to set
   // columns with necessary options.
   hwg_CreateArList( oBrw, aSample )

   // In case of using hwg_CreateArList() you may set some columns options later,
   // for example:
   oBrw:aColumns[1]:heading := "Name"
   oBrw:aColumns[1]:leditable := .t.

   @ 100,180 BUTTON 'Close' SIZE 100,28 ON CLICK {|| oDlg:Close() } ;
         ON SIZE ANCHOR_LEFTABS + ANCHOR_RIGHTABS + ANCHOR_BOTTOMABS

   ACTIVATE DIALOG oDlg
Return Nil
 

gilbertosilverio
Usuário Nível 3

Usuário Nível 3
 
Mensagens: 332
Data de registro: 18 Jan 2009 09:39
Cidade/Estado: Ribeirao Pires - SP
Curtiu: 1 vez
Mens.Curtidas: 23 vezes



Retornar para HwGui

Quem está online

Usuários vendo este fórum: Nenhum usuário registrado online e 3 visitantes


Ola Amigo, espero que meu site e forum tem lhe beneficiado, com exemplos e dicas de programacao.
Entao divulgue o link da Doacao abaixo para seus amigos e redes sociais ou faça uma doacao para o site forum...
MUITO OBRIGADO PELA SUA DOACAO!
Faça uma doação para o forum
cron
v
Olá visitante, seja bem-vindo ao Fórum Clipper On Line!
Efetue o seu login ou faça o seu Registro