
I need to make this box and put the text on one of 9 position
Top left
Top Right
Top Center
Bottom Left
Bottom Right
Bottom Center
Left
Right
Center
I tried the test of Nages but there is something not run ok
I tried with BOx and Roundbox( with brush)
ERROR : the text is never printed on the position I selected
as you can see here

this is the test
#include "fivewin.ch"
Function Test()
local lPrv:=.t.
local oBrush
local nRow:= 5.5 ,;
nCol:= 1 ,;
nHei:= nRow+0.8 ,;
nWid:= 5.5 ,;
cFnt := "Arial" ,;
nSiz := 6 ,;
lBold := .T. ,;
lItalic := .F. ,;
nColorFont := CLR_WHITE ,;
cAlign := "TL" ,;
cTxt:="ABCDEFGH"
local oFnt
local oPrn
DEFINE BRUSH oBrush FILE "c:\fwh\bitmaps\backgrnd\pebbles.bmp"
oPrn:=PrintBegin("Test Box and RoundBox",.F.,lPrv,,.T.)
oPrn:SetPortrait()
PageBegin()
CursorWait()
oFnt:=TFont():New(cFnt,0,-nSiz,.F.,lBold,,,,lItalic,,,,,,,oPrn)
// first test
oPrn:Box(nRow,nCol,nHei,nWid, { CLR_BLACK, 0.01 }, CLR_HGRAY, ;
{ cTxt, oFnt, nColorFont, cAlign }, ;
"CM" )
//Second Test
nRow:= 9.5
nCol:= 1
nHei:= nRow+0.8
nWid:= 5.5
oPrn:RoundBox(nRow,nCol,nHei,nWid,.5, .5, { CLR_HRED, 0.01 }, oBrush, ;
{ cTxt, oFnt, nColorFont, cAlign}, ;
"CM" )
oFnt:end()
RELEASE BRUSH oBrush
PageEnd()
PrintEnd()
CursorArrow()
RETURN NILSince from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com