home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
CLIPPER
/
GETBOX
/
TEST.PRG
< prev
Wrap
Text File
|
1993-12-16
|
2KB
|
42 lines
/*┌──────────────────────────────────────────────────────────────────────┐
▌│ Program Name: TEST.PRG Copyright: PUBLIC DOMAIN │
▌│ Date Created: 12/16/93 Language: Clipper 5.0 │
▌│ Time Created: 00:15:53 Author: Kevin S Gallagher │
▌├──────────────────────────────────────────────────────────────────────┤
▌│ This sample shows how to do a simple @...GET inside of FT_XBOX() │
▌│ Nothing fancy! │
▌└──────────────────────────────────────────────────────────────────────┘
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ */
#xtranslate FT_Space( <s> ) => ;
replicate( chr(255), len( <s> ) )
function main
local getlist := {}, cString := space(20), nCursor := setcursor(2)
SET SCOREBOARD OFF
dispbox(0,0,maxrow(),maxcol(),"░░░░░░░░░","B+/B")
FT_XBOX(,,,"w+/bg","gr+/bg",1,,"FT_BOX AS A GETBOX",;
"Cool little trick huh!";
)
/*
* The trick here is to pad the prompt with spaces, which must
* be with chr(255) and not chr(32), because ft_xbox() will do
* a trim on the string/prompt. Why add the extra spaces? This
* allows the get to be placed inside of the box.
*/
FT_XBOX(,,,,"w+/g","w+/g",,"ENTER YOUR NAME:"+ FT_Space(cString) )
/*
* Position the get at the end of the last line in ft_xbox
*/
@row(),col()-len(cString) get cString color "rb+/n"
read
setcursor(nCursor)
@maxrow(),0
setpos(maxrow()-1,0)
return(.t.)