How to change image on edit_button in xBrowse

Post Reply
mtajkov
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

How to change image on edit_button in xBrowse

Post by mtajkov »

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: Select all | Expand


       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: Select all | Expand


       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) ]
User avatar
FranciscoA
Posts: 2159
Joined: Fri Jul 18, 2008 1:24 am
Location: Chinandega, Nicaragua, C.A.

Re: How to change image on edit_button in xBrowse

Post by FranciscoA »

Hi, try this way:

Code: Select all | Expand

oCol:bBmpData  := { || iif( !empty(RptSpsFak->Prilog1) ,1,2)}
Francisco J. Alegría P.
Chinandega, Nicaragua.

Fwxh-MySql-TMySql
mtajkov
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: How to change image on edit_button in xBrowse

Post by mtajkov »

Thank you Francisco,

but if i use:

Code: Select all | Expand

oCol:bBmpData  := { || iif( !empty(RptSpsFak->Prilog1) ,1,2)}
 
I get it:
Image

I would like this:

Image
Best regards
Milos

[ FWH 21.11 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20150603) ]
User avatar
cmsoft
Posts: 1293
Joined: Wed Nov 16, 2005 9:14 pm
Location: Mercedes - Bs As. Argentina

Re: How to change image on edit_button in xBrowse

Post by cmsoft »

Puedes hacer

Code: Select all | Expand

oCol::oBtnElip:LoadBitmaps("on")
oCol::oBtnElip:SetText("")
 
mtajkov
Posts: 130
Joined: Sun Mar 08, 2009 4:33 pm

Re: How to change image on edit_button in xBrowse

Post by mtajkov »

Thank you
Best regards
Milos

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