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 ?
Btnbmp with a line
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Btnbmp with a line
Last edited by Silvio.Falconi on Thu Jan 09, 2025 1:33 pm, edited 1 time in total.
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
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
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Btnbmp with a line
Dear Silvio,
1. You can modify the Class TBtnBmp source code
2. You may try to use oBtnBmp:bPainted
1. You can modify the Class TBtnBmp source code
2. You may try to use oBtnBmp:bPainted
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Btnbmp with a line
I was inclined to go with the second option butAntonio Linares wrote: Thu Jan 09, 2025 1:14 pm Dear Silvio,
1. You can modify the Class TBtnBmp source code
2. You may try to use oBtnBmp:bPainted
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 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
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
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Btnbmp with a line
You may use a TPanel object and paint what you need...
- Silvio.Falconi
- Posts: 7104
- Joined: Thu Oct 18, 2012 7:17 pm
Re: Btnbmp with a line
ResolvedAntonio Linares wrote: Thu Jan 09, 2025 1:42 pm You may use a TPanel object and paint what you need...
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 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
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
- Antonio Linares
- Site Admin
- Posts: 42259
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
Re: Btnbmp with a line
Dear Silvio,
You are a FWH Master already
You are a FWH Master already