FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour an image on btnbmp and other
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: an image on btnbmp and other
Posted: Wed May 23, 2018 11:57 PM
Displaying prompt of BtnBmp in two fonts:
Code (fw): Select all Collapse
function Test()

   local oWnd, oBtn, oBold, oFont

   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-16 BOLD
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12

   DEFINE WINDOW oWnd
   oWnd:SetFont( oFont )

   @ 20,20 BTNBMP oBtn ;
      PROMPT "BoldText" + CRLF + "SmallText" ;
      FILE "c:\fwh\bitmaps\metro\users.bmp"  ;
      SIZE 96,128 PIXEL OF oWnd FLAT COLOR CLR_WHITE,CLR_GREEN ;
      NOBORDER

   oBtn:oFontBold    := oBold   // <-- NOTE

   ACTIVATE WINDOW oWnd CENTERED
   RELEASE FONT oFont, oBold

return nil


Regards



G. N. Rao.

Hyderabad, India
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: an image on btnbmp and other
Posted: Thu May 24, 2018 05:56 AM

Dear Mr Rao,
thank you so much.
Is it possible to position the caption on top, left or right, too.
Thank you in advance
Otto

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: an image on btnbmp and other
Posted: Thu May 24, 2018 08:11 AM
Code (fw): Select all Collapse
function Test()

   local oDlg, oBtn, oBold, oFont
   local nRow, nCol, n

   DEFINE FONT oBold NAME "TAHOMA" SIZE 0,-14 BOLD
   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-12

   DEFINE DIALOG oDlg SIZE 700,400 PIXEL TRUEPIXEL FONT oFont

   nRow  := 20
   nCol  := 20

   for n := 1 to 3
      @ nRow,nCol BTNBMP oBtn ;
         PROMPT If( n == 3, " ", "" ) + "Bold" + CRLF + "Text" + If( n == 1, " ", "" ) ;
         FILE  "c:\fwh\bitmaps\metro\users.bmp" ;
         SIZE 96,128 PIXEL OF oDlg FLAT TOP COLOR CLR_WHITE,CLR_GREEN ;
         NOBORDER

      oBtn:oFontBold    := oBold   // <-- NOTE
      nCol  += 110
   next

   for n := 1 to 3
      @ nRow,nCol BTNBMP oBtn ;
         PROMPT If( n == 3, " ", "" ) + "Bold" + CRLF + "Text" + If( n == 1, " ", "" ) ;
         FILE  "c:\fwh\bitmaps\metro\users.bmp" ;
         SIZE 96,128 PIXEL OF oDlg FLAT BOTTOM COLOR CLR_WHITE,CLR_GREEN ;
         NOBORDER

      oBtn:oFontBold    := oBold   // <-- NOTE
      nCol  += 110
   next

   nRow     := 160
   nCol     :=  20

   for n := 1 to 3
      @ nRow,nCol BTNBMP oBtn ;
         PROMPT If( n > 1, " ", "" ) + "Bold" + CRLF + "Text" + If( n < 3, " ", "" ) ;
         FILE  "c:\fwh\bitmaps\metro\users.bmp" ;
         SIZE 144,80 PIXEL OF oDlg FLAT LEFT COLOR CLR_WHITE,CLR_GREEN ;
         NOBORDER

      oBtn:oFontBold    := oBold   // <-- NOTE
      nCol  += 160
   next

   nRow     := 260
   nCol     :=  20

   for n := 1 to 3
      @ nRow,nCol BTNBMP oBtn ;
         PROMPT If( n > 1, " ", "" ) + "Bold" + CRLF + "Text" + If( n < 3, " ", "" ) ;
         FILE  "c:\fwh\bitmaps\metro\users.bmp" ;
         SIZE 144,80 PIXEL OF oDlg FLAT RIGHT COLOR CLR_WHITE,CLR_GREEN ;
         NOBORDER

      oBtn:oFontBold    := oBold   // <-- NOTE
      nCol  += 160
   next

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont, oBold

return nil


Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: an image on btnbmp and other
Posted: Fri May 25, 2018 12:27 AM
fantastic
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: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: an image on btnbmp and other
Posted: Tue Jun 19, 2018 10:08 AM

How have a list of btnbmp pressed ?

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: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: an image on btnbmp and other
Posted: Tue Jun 19, 2018 10:11 AM

check for oBtn:lPressed in a loop

Regards



G. N. Rao.

Hyderabad, India
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: an image on btnbmp and other
Posted: Tue Jun 19, 2018 03:32 PM

yes but I have many problems

1) not have the last version of fwh I am stop on dec 17 I cannot use your function fw_

2) I must adapt it on my application

3) I show the image over the btnbmp then when I make a control with my data (sample check_in and check_out to see if it is a reservation of one day or it is payed)

4) when I use toggle method I erase the other commands because each btnbmp must show a popupmenu with a menu

5 ) when I click on each buttons I must show the reservation dialog ( made by you) into ribbonbar

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

Continue the discussion