toggle with BTNBMP

toggle with BTNBMP

Postby Otto » Sun Jun 23, 2019 7:38 am

Hello,
should toggle on BTNBMP work?
Best regards
Otto

Code: Select all  Expand view  RUN
@ 10, 65;
   BTNBMP oBtnVerrechnung ;
          OF oDlg   FLAT ;
        SIZE 30, 30 ;
       PIXEL ;
      RESOURCE "CHECKON", "CHECKOFF" ;
        FONT oFont ;
      ACTION (  f_checkall(oBtnVerrechnung), oBtnVerrechnung:refresh() );
      COLOR  CLR_WHITE,  12088150
   
func f_checkall
...
if lToggle = .t.
    lToggle = .F.
    oBtnVerrechnung:bBmpNo := { || 2 }
else
    lToggle = .T.
    oBtnVerrechnung:bBmpNo := { || 1 }
endif
 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm

Re: toggle with BTNBMP

Postby nageswaragunupudi » Sun Jun 23, 2019 11:36 am

Code: Select all  Expand view  RUN
function ToggleBtn()

   local oDlg, oBtn
   local lToggle  := .t.

   DEFINE DIALOG oDlg SIZE 400,400 PIXEL TRUEPIXEL

   @ 50,50 BTNBMP oBtn RESOURCE "c:\fwh\bitmaps\32X32\yes.bmp", nil, ;
                                "c:\fwh\bitmaps\32X32\no.bmp" ;
   ACTION ( lToggle := !lToggle )

   oBtn:bBmpNo    := { || If( lToggle, 1, 3 ) }

   ACTIVATE DIALOG oDlg CENTERED

return nil
 
Regards

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

Re: toggle with BTNBMP

Postby Otto » Sun Jun 23, 2019 3:25 pm

Dear Mr. Rao,
thank you. This is working fine.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6346
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 60 guests

cron