FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Btnbmp with a line
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Btnbmp with a line
Posted: Thu Jan 09, 2025 12:44 PM
is it possible to create a dividing line between the image and the text in a btnbmp?

example




if there is no image the text must be in the center without the line



I saw that if I upload an image on a white background the button then puts the text on a gray background
Any solution ?
Since 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Btnbmp with a line
Posted: Thu Jan 09, 2025 01:14 PM

Dear Silvio,

  1. You can modify the Class TBtnBmp source code

  2. You may try to use oBtnBmp:bPainted

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Btnbmp with a line
Posted: Thu Jan 09, 2025 01:35 PM
Antonio Linares wrote: Dear Silvio,

1. You can modify the Class TBtnBmp source code

2. You may try to use oBtnBmp:bPainted
I was inclined to go with the second option but
the problem is that if the text is bigger you should make the image smaller to give more prominence to the text
Since 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Btnbmp with a line
Posted: Thu Jan 09, 2025 01:42 PM

You may use a TPanel object and paint what you need...

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Btnbmp with a line
Posted: Thu Jan 09, 2025 09:48 PM
Antonio Linares wrote: You may use a TPanel object and paint what you need...
Resolved
although maybe I should calculate the length of the caption
oImage:bpainted:= { |hDC| MyLine(hDC,{oImage:nBottom - 50, 1,oImage:nWidth,147 },RGB(195,195,185),RGB(195,195,185)) }


Since 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Btnbmp with a line
Posted: Fri Jan 10, 2025 07:23 AM
Dear Silvio,

You are a FWH Master already :wink:
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion