FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Poner 2 Botones + -
Posts: 537
Joined: Mon Jan 16, 2006 03:42 PM
Poner 2 Botones + -
Posted: Sat Aug 17, 2019 08:26 PM
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Poner 2 Botones + -
Posted: Sat Aug 17, 2019 10:50 PM

Prueba esto

#include "Fivewin.ch"

Function Main()
   XbrSpinner()
Return nil

Function XbrSpinner()

   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
      :nStretchCol   := 3
      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
      WITH OBJECT :Salary
         :cEditPicture  := "9,999,999,999.99"
      END

      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

Return nil
//----------------------------------------------------------------------------//
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces

Continue the discussion