Silvio,
You can draw boxes ( borders ) around any object, any position and color like :
...
...
// RoundBox( <hDC>, <nTop>, <nLeft>, <nBottom>, <nRight>, <nEllipseWidth>, <nEllipseHeight> )
// multiple objects :
oDlg:bPainted := < |hDC|
( RoundBox( hDC,
580, 8, 845, 232, 5, 5, 255 ), ; // can be Your SAY-position
RoundBox( hDC, 578, 238, 845, 292, 5, 5, 255 ), ;
RoundBox( hDC, 580, 298, 760, 358, 5, 5, 255 ), ;
RoundBox( hDC, 580, 365, 846, 456, 5, 5, 255 ), ;
RoundBox( hDC, 580, 462, 845, 530, 5, 5, 255 ) )
RETURN NIL
// or for a single object :
oDlg:bPainted := < |hDC|
RoundBox( hDC,
580, 8, 845, 232, 5, 5, 255 )
RETURN NIL
ACTIVATE DIALOG oDlg CENTER
RETURN( NIL)
A test with a border around 2 says ( group-border ) :
@ 230, 675 SAY "Age to = 0" SIZE 150, 22 PIXEL
@ 250, 675 SAY "shows only Age from" SIZE 150, 22 PIXEL
// RoundBox( <hDC>, <nTop>, <nLeft>, <nBottom>, <nRight>, <nEllipseWidth>, <nEllipseHeight> )
oDlg2:bPainted := < |hDC|
RoundBox( hDC, 670, 228, 830, 272, 5, 5, 255 )
RETURN NIL
>-------------------
-------------------
without a needed pensize You can use the solution from above
because RoundBox doesn't support the pensize
, I'm using my own function
a all in one solution for < fillrect and border > :
DRAWBORDER ( hDC, nTop, nLeft, nBottom, nRight, nWidth, nHeight,
nPen, nBGColor )
if nPen = NIL, fillrect is used.
@ 230, 675 SAY oSay[1] PROMPT "Age to = 0" SIZE 150, 22 PIXEL COLOR CLR_BLACK
@ 250, 675 SAY oSay[2] PROMPT "shows only Age from" SIZE 150, 22 PIXEL COLOR CLR_BLACK
the calculated border using my new function :
oDlg2:bPainted := < |hDC|
DRAWBORDER( hDC, oSay[1]:nTop -2, oSay[1]:nLeft -2 -5, ; // 2 = space, 5 = pensize
oSay[2]:nBottom +2, oSay[2]:nRight +2, 10, 10, 5, CLR_HBLUE )
RETURN NIL
>
regards
Uwe