Page 1 of 1

add a column on xbrowse and del Row

Posted: Thu Jul 12, 2018 9:21 am
by Silvio.Falconi
How add a column on a xbrowse and insert a button sample "x" or bmp to erase that row ?

sample : ( I draw it )

Image

Re: add a column on xbrowse and del Row

Posted: Fri Jul 13, 2018 8:32 am
by Silvio.Falconi
Nages,
I made
@ 120, 02 XBROWSE oBrowse OF oDlg ;
COLUMNS 1, 2, 3, 4, 5 ;
HEADERS "ico","Descrizione servizio","Q.tà","Prezzo","Totale" ;
COLSIZES 10, 380, 80, 120,120 ;
ARRAY aData ;
SIZE 100,82 PIXEL NOBORDER


ADD COLUMN TO XBROWSE oBrowse


then
WITH OBJECT oBrowse

WITH OBJECT oBrowse:aCols[ 6]
:AddBmpFile(".\bitmaps\DLG_NO_MIN.bmp ")
:lBmpStretch := .F.
:lBmpTransparent := .T.
:nwidth := 10
:nEditType := EDIT_BUTTON
:bEditBlock := { ||DeleteRow(oBrowse,aGet) }
END
END


the problem : ( I not see the bitmap on row but only the button)

Image

then I wish insert a button also on header with the action to delete all rows ( it is an array)

Re: add a column on xbrowse and del Row

Posted: Fri Jul 13, 2018 8:35 am
by Silvio.Falconi
Sorry my mistake
:nBtnBmp := 1

How I can insert a button/btnbmp on the header of this column ? with action ?

Re: add a column on xbrowse and del Row

Posted: Fri Jul 13, 2018 10:20 am
by Silvio.Falconi
Resolved thanks to Cristobal Navarro one of the most my Friends !!!!