home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 16
/
CD_ASCQ_16_0994.iso
/
news
/
4611
/
fw16d.ins
/
SAMPLES
/
TESTLBX.PRG
< prev
next >
Wrap
Text File
|
1994-06-07
|
1KB
|
40 lines
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oWnd, oLbx, oSay
local cItem := "Two"
DEFINE WINDOW oWnd FROM 1, 1 TO 20, 60 ;
TITLE "Testing a ListBox" ;
COLOR "W+/B"
@ 2, 2 LISTBOX oLbx VAR cItem ;
ITEMS { "One", "Two", "Three", "Four", "Five",;
"Six", "Seven", "Eight", "Nine", "Ten" } ;
OF oWnd SIZE 200, 150 ;
COLOR "W+/BG" ;
ON CHANGE oSay:Refresh() ;
MESSAGE "Please select an Item"
// VALID ( MsgInfo( "Just testing valid clause..." ), .t. )
@ 2, 40 SAY oSay VAR cItem SIZE 80, 20 OF oWnd
@ 8, 42 BUTTON "&Add" SIZE 80, 20 OF oWnd ;
MESSAGE "Add a new item to the listbox" ;
ACTION oLbx:Add( Time() )
@ 11, 42 BUTTON "&End" SIZE 80, 20 OF oWnd ;
ACTION oWnd:End() ;
MESSAGE "Press me to end this test"
SET MESSAGE OF oWnd TO "Testing a ListBox"
ACTIVATE WINDOW oWnd
return nil
//----------------------------------------------------------------------------//