#INCLUDE "FiveWin.ch"
#include "xbrowse.ch"
FUNCTION test()
local oDlg
local oCol
local vgetlist
local dbstructuur:={}
aadd(dbstructuur, { 'NAME','C',16,0})
dbcreate('TEST',dbstructuur)
use test new EXCLUSIVE
index on upper(name) tag tmp
DEFINE DIALOG oDlg RESOURCE "TEST"
vGetlist := TXBrowse():New( oDlg )
REDEFINE BUTTON ID 100 OF oDlg ACTION addname(vgetlist)
oCol := vGetlist:AddCol()
oCol:bStrData := { || test->name}
oCol:cHeader := 'NAME'
oCol:nWidth := 100
oCol:lAllowSizing := .f.
vGetlist:lAllowRowSizing := .f.
vGetlist:nRowHeight := 20
vGetlist:nMarqueeStyle := MARQSTYLE_HIGHLCELL
vGetlist:nColDividerStyle := LINESTYLE_LIGHTGRAY
vGetlist:nRowDividerStyle := LINESTYLE_LIGHTGRAY
vGetlist:SetRDD()
vGetlist:CreateFromResource( 101 )
ACTIVATE DIALOG oDlg CENTERED
RETURN nil
FUNCTION addname(vgetlist)
appe blank
repl name with str(HB_RANDOMINT(1,10000) ,5,0)
vgetlist:refresh()
RETURN nil
TEST DIALOG 6, -35, 489, 395
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "TXBrowse test"
FONT 8, "MS Sans Serif"
{
CONTROL "", 101, "TXBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 8, 27, 340, 357
GROUPBOX "Name", 11, 3, 11, 352, 381, BS_GROUPBOX
PUSHBUTTON "ADD", 100, 377, 25, 92, 19
}
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 61 guests