FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to change image on edit_button in xBrowse
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
How to change image on edit_button in xBrowse
Posted: Tue Jun 25, 2024 06:08 PM
Depending on the column value in the DBF file I want to change the image on the EDIT_BUTTON

this is the current code:
Code (fw): Select all Collapse
       oCol := oBrwZbr:AddCol()
       oCol:nBtnBmp := 1
       oCol:AddResource("PDF")
       oCol:nWidth    := 36
       oCol:oDataFont     := oFontBrw
       oCol:nEditType     := EDIT_BUTTON
       oCol:bEditBlock    := { | nRow, nCol, oCol, nKey | DownLoadXml(rtrim(RptSpsFak->Eid),"1") }
I tried:
Code (fw): Select all Collapse
       oCol := oBrwZbr:AddCol()
       oCol:nBmpData  := { || iif( !empty(RptSpsFak->Prilog1) ,1,2)} 
       oCol:AddResource("PDF")
        oCol:AddResource("OFF")
       oCol:nWidth    := 36
       oCol:oDataFont     := oFontBrw
       oCol:nEditType     := EDIT_BUTTON
       oCol:bEditBlock    := { | nRow, nCol, oCol, nKey | DownLoadXml(rtrim(RptSpsFak->Eid),"1") }
but oCol:nBmpData does not allow that possibility.

I would also like to be able to dynamically change the nEditType.
Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 2170
Joined: Fri Jul 18, 2008 01:24 AM
Re: How to change image on edit_button in xBrowse
Posted: Tue Jun 25, 2024 08:43 PM
Hi, try this way:
Code (fw): Select all Collapse
oCol:bBmpData  := { || iif( !empty(RptSpsFak->Prilog1) ,1,2)}
Francisco J. Alegría P.

Chinandega, Nicaragua.



Fwxh-MySql-TMySql
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: How to change image on edit_button in xBrowse
Posted: Wed Jun 26, 2024 04:35 AM
Thank you Francisco,

but if i use:
Code (fw): Select all Collapse
oCol:bBmpData  := { || iif( !empty(RptSpsFak->Prilog1) ,1,2)}
I get it:


I would like this:

Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: How to change image on edit_button in xBrowse
Posted: Wed Jun 26, 2024 01:26 PM
Puedes hacer
Code (fw): Select all Collapse
oCol::oBtnElip:LoadBitmaps("on")
oCol::oBtnElip:SetText("")
Posts: 130
Joined: Sun Mar 08, 2009 04:33 PM
Re: How to change image on edit_button in xBrowse
Posted: Sun Jun 30, 2024 06:11 AM

Thank you

Best regards

Milos



[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]

Continue the discussion