xbrowse bitmap from resource

Post Reply
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

xbrowse bitmap from resource

Post by damianodec »

hi,
inside my .res file there are Bitmaps "RED" and "GREEN" (a little ball) and I link .res when compile.

how can I show bmp inside my XBROWSE after EMAIL column depending on EMAIL value (in EMAIL there is 1 for green or 2 for red numeric value) ?:

Code: Select all

local oColB
DEFINE IMAGE oBmp RESOURCE "RED"
...
    @ 40,10 XBROWSE oBrw SIZE -10,-50 PIXEL ;
            ALIAS "CNTINS" ;
      COLUMNS "TPLET", "EMAIL"  ;
      HEADERS "Let.","Mail" ;
      PICTURE nil, nil ;             
      OF oDlg2
         oBrw:CreateFromCode()
 
thank you
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
leandro
Posts: 958
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia
Contact:

Re: xbrowse bitmap from resource

Post by leandro »

Parte del código ejemplo en testxbrw.prg

Code: Select all

   oCol := oBrw:AddCol()
   oCol:AddResource("GREEN")
   oCol:AddResource("RED")
   oCol:cHeader  := "Married"
   oCol:bBmpData   := { || iif( _FIELD->Married, 1, 2) }
   oCol:bStrData   := { || iif( _FIELD->Married, "Yes", "No ")}
   oCol:bEditValue := { || _FIELD->Married }
   oCol:nDataStyle := oCol:DefStyle( AL_RIGHT, .T.)
   oCol:nEditType := EDIT_LISTBOX
   oCol:aEditListTxt   := { "Yes", "No"}
   oCol:aEditListBound := { .t., .f. }
   oCol:bOnPostEdit := {|o, v| (DBRLOCK(), _FIELD->Married := v, DBUNLOCK() ) }
 
Saludos
LEANDRO ALFONSO
SISTEMAS LYMA - BASE
Bogotá (Colombia)
[ FWH 19.09 ] [ xHarbour 1.2.3 Intl. (SimpLex) (Build 20190613) ] [ Embarcadero C++ 7.30 for Win32 ]
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

Re: xbrowse bitmap from resource

Post by damianodec »

thank you Leandro
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Post Reply