xbrowse -get date - resolved

xbrowse -get date - resolved

Postby Silvio.Falconi » Mon Jul 08, 2019 10:29 am

to inser on a column a calenda I made

WITH OBJECT oBrowse:aCols[ 7]
:AddBitmap( "INVOICE_CALENDARIO")
:nBtnBmp := 1
:lBtnTransparent := .t.
* :lBmpStretch := .f.
:nwidth := 120
:nDataStrAlign := AL_CENTER
:nHeadStrAlign := AL_CENTER

:nDataStrAlign := oBrowse:aCols[ 7]:DefStyle(AL_LEFT,.f.)
:nEditType := EDIT_BUTTON
:bEditBlock := { |r,c,o,k|(XbrGetDate( o,"Seleziona una data",,1 ),oBrowse:refresh()) }
END

But it make error , how I can resolve please ?
Last edited by Silvio.Falconi on Wed Jul 10, 2019 7:56 am, edited 1 time in total.
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: 7043
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse -get date

Postby nageswaragunupudi » Mon Jul 08, 2019 12:58 pm

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

REQUEST DBFCDX

function Main()

   local oDlg, oFont, oBrw

   USE CUSTOMER SHARED

   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE DIALOG oDlg SIZE 800,600 PIXEL TRUEPIXEL FONT oFont

   @ 20,20 XBROWSE oBrw SIZE -20,-20 PIXEL OF oDlg ;
      DATASOURCE "CUSTOMER" ;
      COLUMNS "FIRST","CITY","HIREDATE","AGE", "SALARY" ;
      PICTURES nil, nil, "dd-mmmm-yyyy" ;
      CELL LINES NOBORDER

   WITH OBJECT oBrw
      :nEditTypes    := EDIT_GET
      WITH OBJECT :HireDate
         :nEditType  := EDIT_BUTTON
         :AddBitmap( "c:\fwh\bitmaps\calendar.bmp" )
         :nBtnBmp    := 1
         :bEditBlock := { |r,c,o,k| XbrGetDate( o ) }
      END
      //
      :CreateFromCode()
   END

   ACTIVATE DIALOG oDlg CENTERED
   RELEASE FONT oFont

return nil
 


Image
Regards

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

Re: xbrowse -get date

Postby Silvio.Falconi » Mon Jul 08, 2019 2:28 pm

Nages,
here not run ok
I have an array ( aItems)





Code: Select all  Expand view

@ 120, 02 XBROWSE  oBrowse OF oFolder:aDialogs[1] ;
        COLUMNS 3,4,5,6,7,8,9,10,11,12,13;
        HEADERS    "Ico","Tipo","Servizio","Q.tà","Costo","Tot p q.tà","Dal","al","Giorni","Sconto","Totale"   ;
        COLSIZES 30, 30,100,50,90,90,80,80,60,90,90 ;
        PICTURES nil, nil,"@!","9999","999,999,999","999,999,999", "dd-mmmm-yyyy","dd-mmmm-yyyy","999","999,99","999,999,999";
        ARRAY aItems       ;
        SIZE 100,82 PIXEL NOBORDER

 ADD COLUMN TO XBROWSE oBrowse

         bCalcRow := { || (oBrowse:aCols[ 6 ]:VarPut( oBrowse:aCols[ 4 ]:Value * oBrowse:aCols[ 5 ]:Value ),;
                           oBrowse:aCols[ 11 ]:VarPut(( oBrowse:aCols[ 6 ]:value * oBrowse:aCols[ 9 ]:value)-oBrowse:aCols[ 10 ]:value),;
                             CalcoloTotali(oBrowse,aGet)     )}


     WITH OBJECT oBrowse
        :nRowHeight    := 30

       WITH OBJECT oBrowse:aCols[ 1]
          :bFooter   := { || Ltrim( Str( oBrowse:KeyNo() ) ) + " / " + LTrim( Str( oBrowse:KeyCount() ) )+" servizi" }
          :lBmpStretch     := .F.
          :lBmpTransparent := .T.
          :nwidth := 30
          :bStrImage       := {|| oBrowse:aArrayData[ oBrowse:narrayat][3] }

       END

       WITH OBJECT oBrowse:aCols[ 2]
          :AddBitmap({"INVOICE_ELEMENTO",;
                      "INVOICE_SERVIZIO",;
                      "INVOICE_PACCHETTO",;
                      "INVOICE_LISTINO"})

            :lBtnTransparent := .t.
           :bStrImage       := {|| GiveType(alltrim(oBrowse:aArrayData[ oBrowse:narrayat][4]))  }
       END



          WITH OBJECT oBrowse:aCols[ 4]
          :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| IIF( oCol:Value>0,oCol:VarPut( oCol:Value - 1 ),) }
         :bOnChange := bCalcRow

      END


     // colona per totale x qut  riga
                    WITH OBJECT  oBrowse:aCols[ 6]
                         :nFooterType      := AGGR_SUM
                         :cEditPicture := '@ €99,999.99'
                      END




         WITH OBJECT oBrowse:aCols[ 7]
         :nEditType  := EDIT_BUTTON
         :AddBitmap( "c:\work\fwh\bitmaps\calendar.bmp" )
         :nBtnBmp    := 1
         :bEditBlock := { |r,c,o,k| XbrGetDate( o ) }
         END

 WITH OBJECT oBrowse:aCols[ 8]
         :nEditType  := EDIT_BUTTON
         :AddBitmap( "c:\work\fwh\bitmaps\calendar.bmp" )
         :nBtnBmp    := 1
         :bEditBlock := { |r,c,o,k| XbrGetDate( o ) }
         END
   WITH OBJECT  oBrowse:aCols[ 10]
                  :nEditType     := EDIT_GET
                  :bOnChange := bCalcRow
               END


       // colona per totale riga
                    WITH OBJECT  oBrowse:aCols[ 11]
                         :nFooterType      := AGGR_SUM
                         :cEditPicture := '@ €99,999.99'
                      END

      WITH OBJECT oBrowse:aCols[ 12]
                       :AddBitmap({"INVOICE_CANCELLA","INVOICE_INCOLLA"})
                       :nBtnBmp := 1
                       :lBmpStretch     := .F.
                       :lBmpTransparent := .T.
                       :nwidth := 30
                       :nEditType := EDIT_BUTTON
                       :bEditBlock := { ||DeleteRow(oBrowse,aGet)  }
                       :nHeadBmpNo := 2
                       :cHeader := ""
                       :bLClickHeader  := { ||DeleteAllRows(oBrowse,aGet)  }
                      END


                      :lHscroll         := .F.
                      :l2007            := .F.
                      :l2015            := .T.
                      :nStretchCol      := STRETCHCOL_WIDEST
                      :nColDividerStyle := LINESTYLE_LIGHTGRAY
                      :lAllowRowSizing     := .F.
                      :lAllowColSwapping   := .F.
                      :lAllowColHiding     := .F.
                      :nMarqueeStyle       := MARQSTYLE_HIGHLROWMS
                      :CreateFromCode()
    END



 
Last edited by Silvio.Falconi on Fri Mar 06, 2020 8:10 am, edited 1 time in total.
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: 7043
Joined: Thu Oct 18, 2012 7:17 pm

Re: xbrowse -get date

Postby Silvio.Falconi » Mon Jul 08, 2019 5:28 pm

Sorry, now t it run ok , there was also the oldest datepick compiled!!!!

only i have no transparent bitmap also tried with pngs
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: 7043
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 51 guests