Problem with say...Border

Problem with say...Border

Postby Silvio.Falconi » Thu Mar 21, 2019 5:52 pm

Image

How I can to erase 3d border and have a Border no 3d ? I wish a colored border fine. I remember there is a new command of Cristobal but I not found it

@ 12, 98 SAY "Tipo Cliente :" OF oDlg SIZE 60, 8 PIXEL FONT oBold
@ 10, 140 SAY oTipoSay Prompt oRec:tipocli OF oDlg SIZE 60, 11 PIXEL FONT oFont border
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with say...Border

Postby cnavarro » Thu Mar 21, 2019 6:45 pm

Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Problem with say...Border

Postby Silvio.Falconi » Fri Mar 22, 2019 7:56 am

yes... but why I not have on include ?
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with say...Border

Postby Silvio.Falconi » Fri Mar 22, 2019 8:04 am

but it is for get
I have a say
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7056
Joined: Thu Oct 18, 2012 7:17 pm

Re: Problem with say...Border

Postby ukoenig » Fri Mar 22, 2019 9:35 am

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 ) :

Image

@ 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
>

Image

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Problem with say...Border

Postby ukoenig » Fri Mar 22, 2019 9:43 pm

Silvio,

Multiple, seperated says and calculated border-size
for more says just add another section for the say-object ( don't care about the size )
This solution can be used for any objects like radios, gets ....

@ 225, 675 SAY oSay[1] PROMPT "Age to = 0" SIZE 80, 22 PIXEL COLOR CLR_BLACK
@ 250, 675 SAY oSay[2] PROMPT "shows only Age from" SIZE 150, 22 PIXEL COLOR CLR_BLACK

oDlg:bPainted := < |hDC|
( RoundBox( hDC, oSay[1]:nLeft -2, oSay[1]:nTop, ;
oSay[1]:nRight +2, oSay[1]:nBottom, , , 255 ), ;
RoundBox( hDC, oSay[2]:nLeft -2, oSay[2]:nTop, ;
oSay[2]:nRight +2, oSay[2]:nBottom, , , 255 ) )
RETURN NIL
>


Image

regards
Uwe :D
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 93 guests