To Mr Rao

To Mr Rao

Postby Silvio.Falconi » Sat Dec 15, 2018 8:32 pm

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

Re: To Mr Rao

Postby nageswaragunupudi » Sun Dec 16, 2018 11:51 pm

Code: Select all  Expand view  RUN
#include "fivewin.ch"

function Main()

   local oDlg, oFont, oBrw

   USE CUSTOMER

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 500,400 PIXEL TRUEPIXEL FONT oFont

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "FIRST", "AGE", "SALARY" ;
      LINES NOBORDER

   WITH OBJECT oBrw
      :nRowHeight    := 30
      WITH OBJECT :Age
         :nWidth        := 100
         :nDataStrAlign := AL_CENTER
         :AddBitmap( { FW_BmpPlus(), FW_BmpMinus() } )

         // Right Button
         :nEditType     := EDIT_BUTTON
         :bEditBlock    := { |r,c,oCol| oCol:Value + 1 }
         :nBtnBmp       := 1
         :lBtnTransparent  := .t.

         // Left Button
         :bBmpData      := { |v,lSel| If( lSel, 2, 0 ) }
         :bBmpAction    := { |oCol| oCol:VarPut( oCol:Value - 1 ) }
      END

      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 
Regards

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

Re: To Mr Rao

Postby Silvio.Falconi » Mon Dec 17, 2018 7:56 am

Thanks Mr Rao
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: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Mr Rao

Postby Silvio.Falconi » Mon Dec 17, 2018 3:39 pm

Nages,
the first button is transparent , the second no , why ?

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

Re: To Mr Rao

Postby nageswaragunupudi » Mon Dec 17, 2018 4:38 pm

Do not change bBmpAction.

Use
Code: Select all  Expand view  RUN

bCalcRow := { || oBrw:aCols[ 5 ]:VarPut( oBrw:aCols[ 3 ]:Value * oBrw:aCols[ 4 ]:Value ) }
oBrw:aCols[ 3 ]:bOnChange := bCalcRow
oBrw:aCols[ 4 ]:bOnChange := bCalcRow
 

XBrowse recalculates totals automatically
Regards

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

Re: To Mr Rao

Postby Silvio.Falconi » Mon Dec 17, 2018 5:11 pm

ok but there is a problem
Image

if I press - it can go to zero and then -1

How I can to insert MIN and Max as get spinner ?
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: 7076
Joined: Thu Oct 18, 2012 7:17 pm

Re: To Mr Rao

Postby Silvio.Falconi » Mon Dec 17, 2018 5:32 pm

I resolved with
:bBmpAction := { |oCol| IIF( oCol:Value>0,oCol:VarPut( oCol:Value - 1 ),) }
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: 7076
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests