an image on btnbmp and other

Re: an image on btnbmp and other

Postby nageswaragunupudi » Wed May 23, 2018 11:57 pm

Displaying prompt of BtnBmp in two fonts:
Code: Select all  Expand view
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


Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10469
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: an image on btnbmp and other

Postby Otto » Thu May 24, 2018 5: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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6255
Joined: Fri Oct 07, 2005 7:07 pm

Re: an image on btnbmp and other

Postby nageswaragunupudi » Thu May 24, 2018 8:11 am

Code: Select all  Expand view
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
 


Image
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10469
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: an image on btnbmp and other

Postby Silvio.Falconi » Fri May 25, 2018 12:27 am

fantastic
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: 6897
Joined: Thu Oct 18, 2012 7:17 pm

Re: an image on btnbmp and other

Postby Silvio.Falconi » 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 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: 6897
Joined: Thu Oct 18, 2012 7:17 pm

Re: an image on btnbmp and other

Postby nageswaragunupudi » Tue Jun 19, 2018 10:11 am

check for oBtn:lPressed in a loop
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10469
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: an image on btnbmp and other

Postby Silvio.Falconi » Tue Jun 19, 2018 3: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 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: 6897
Joined: Thu Oct 18, 2012 7:17 pm

Previous

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests