xbrowse edit columns

jbrita
Posts: 425
Joined: Mon Jan 16, 2006 3:42 pm

Re: xbrowse edit columns

Post by jbrita »

Friends, how to do this with 2 buttons + -

REGARDS
jbrita
Posts: 425
Joined: Mon Jan 16, 2006 3:42 pm

Re: xbrowse edit columns

Post by jbrita »

hello
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse edit columns

Post by Silvio.Falconi »

please search Rao's sample test
from 18.04:

Code: Select all

   
WITH OBJECT oBrowse:aCols[ 4]
          :nWidth        := 100
          :nDataStrAlign := AL_CENTER
          :AddBitmap( { FW_BmpPlus(), FW_BmpMinus() } )

          // Right Button
         :nEditType     := EDIT_BUTTON
         :bEditBlock    := { |r,c,oCol|IIF(!oBrowse:nArrayAt = 1, oCol:Value + 1,) }
         :nBtnBmp       := 1
         :lBtnTransparent  := .t.

         // Left Button
           :bBmpData      := { |v,lSel| If( lSel, 2, 0 ) }
           :bBmpAction    := { |oCol|  IIF(!oBrowse:nArrayAt = 1,IIF( oCol:Value>0,oCol:VarPut( oCol:Value - 1 ),),) }
           :bOnChange := bCalcRow
           :lBmpTransparent := .T.
        END
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply