xbrowse bitmap from resource

xbrowse bitmap from resource

Postby damianodec » Sun Feb 14, 2021 8:36 am

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  Expand view  RUN

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
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: xbrowse bitmap from resource

Postby leandro » Sun Feb 14, 2021 10:15 am

Parte del código ejemplo en testxbrw.prg
Code: Select all  Expand view  RUN

   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 AREVALO
Bogotá (Colombia)
https://hymlyma.com
https://hymplus.com/
leandroalfonso111@gmail.com
leandroalfonso111@hotmail.com

[ Embarcadero C++ 7.60 for Win32 ] [ FiveWin 23.07 ] [ xHarbour 1.3.0 Intl. (SimpLex) (Build 20230914) ]
User avatar
leandro
 
Posts: 1676
Joined: Wed Oct 26, 2005 2:49 pm
Location: Colombia

Re: xbrowse bitmap from resource

Postby damianodec » Mon Feb 15, 2021 7:15 am

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)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 80 guests