COLPOS NO BROWSE
Enviado: 06 Mai 2023 10:56
Ola Amigos,
Baseado neste exemplo:
Por que retorna "3" se estou alterando a coluna 10 do browse.
colpos nao teria que ser 10?
Com faco para retornar que estou alterando a coluna 10...
Baseado neste exemplo:
Código: Selecionar todos
/* This is a very basic sample of using browse.
Hwg_WChoice() do the same and more */
#include "hwgui.ch"
Function Test()
Local oDlg, oBrw
Local aSample := { {"Alex",17,1200,17,1200,17,1200,17,1200,17,1200}, {"Victor",42,1600,17,1200,17,1200,17,1200,17,1200}, {"John",31,1000,17,1200,17,1200,17,1200,17,1200} }
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 SIZE 280,140 STYLE WS_BORDER + WS_VSCROLL AUTOEDIT ;
ON UPDATE {|| HWG_MSGINFO(STR(oBRW:COLPOS)) }
// 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 := "Age"
oBrw:aColumns[10]:heading := "COL10"
oBrw:aColumns[10]: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
colpos nao teria que ser 10?
Com faco para retornar que estou alterando a coluna 10...