Hi,
I have a xbrowse that read data by ADOdb.
there are 4 columns: NAME, CITY, AGE, COLOR
in the field COLOR I can only insert 4 option: AR, AB, AC, AO
I would like that xbrowse shows a little icon or bitmap with a color associated (AR YELLOW, AB BLUE, AC GREEN, AO RED)
How can I do it ?
xbrowse icon and filter
- damianodec
- Posts: 422
- Joined: Wed Jun 06, 2007 2:58 pm
- Location: Italia
- Contact:
xbrowse icon and filter
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)
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Re: xbrowse icon and filter
Maybe:
\samples\TESTMERG.PRG
Regards, saludos.
\samples\TESTMERG.PRG
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- damianodec
- Posts: 422
- Joined: Wed Jun 06, 2007 2:58 pm
- Location: Italia
- Contact:
Re: xbrowse icon and filter
Hi Karinha,
i'd like a column with inside a icon or bitmap with color associated
i'd like a column with inside a icon or bitmap with color associated
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)
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Re: xbrowse icon and filter
Something like that?
https://forums.fivetechsupport.com/view ... f3#p240102
https://forums.fivetechsupport.com/view ... f3#p157394
Regards, saludos.
https://forums.fivetechsupport.com/view ... f3#p240102
https://forums.fivetechsupport.com/view ... f3#p157394
Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: xbrowse icon and filter
Is this what you want ?
A Icon/jpg bases on data
A color based on data
Code: Select all | Expand
static aBmp := { "c:\marc32\bitmaps\16x16\yes.bmp",;
"c:\marc32\bitmaps\16x16\stop.bmp",;
"c:\marc32\bitmaps\16x16\help2.bmp",;
"c:\marc32\bitmaps\16x16\additem.bmp" }
oBrw[6]:Akt:bClrStd := { || MyColors("WEBSHOPPRIJZEN","AKTIEF",oBrw[6])}
WITH OBJECT :Akt
:AddBitmap( aBmp )
:bBmpData := {|| AktiefBmp(oBrw:Akt:Value) }
END
FUNCTION AktiefBmp(nValue)
do case
case nValue == 0
RETURN(2)
case nValue == 1
RETURN(1)
case nValue == 2
RETURN(3)
case nValue == 3
RETURN(3)
case nValue == 4
RETURN(4)
endcase
RETURN(1)
Function MyColors( cBrowse, cType, oBrw )
local aColors := { CLR_BROWSE1, CLR_BROWSE2 }
do case
case cBrowse = "ARTIKEL_ZOEKLIJST" .and. cType = "BENAMING"
do case
case right(alltrim(oBrw:code:value),2) = "00"
aColors := { nClrTxtBrw, CLR_SOFTYELLOW }
otherwise
aColors := { nClrTxtBrw, If( oBrw:KeyNo() % 2 == 0, CLR_BROWSE2,CLR_BROWSE1)}
endcase
case cBrowse = "WEBSHOPPRIJZEN" .and. cType = "AKTIEF"
do case
case oBrw:akt:value = 3
aColors := { nClrTxtBrw, MY_ORANGE }
case oBrw:akt:value = 1
aColors := { nClrTxtBrw, MY_LIGHTYELLOW }
otherwise
aColors := { nClrTxtBrw, If( oBrw:KeyNo() % 2 == 0, CLR_BROWSE2,CLR_BROWSE1)}
endcase
// ...... ALL Color Systems
endcase
return aColors
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour
- nageswaragunupudi
- Posts: 10691
- Joined: Sun Nov 19, 2006 5:22 am
- Location: India
- Contact:
Re: xbrowse icon and filter
Code: Select all | Expand
#include "fivewin.ch"
function Main()
local aData, aclr := { "AR", "AB", "AC", "AO" }
aData := {{"Homers","Springfield",50,"AB"},;
{"Ceci", "Miami", 28,"AC"},;
{"Reg", "Scottsdale", 43,"AO"},;
{"David", "Hingham", 34,"AR"},;
{"Hugh", "Tarzana", 89,"AB"} }
XBROWSER aData SETUP ( ;
oBrw:cHeaders := { "NAME", "CITY", "AGE", "COLOR" }, ;
oBrw:Color:AddBitmap( { "..\bitmaps\fdem5.bmp", ;
"..\bitmaps\fdem7.bmp", "..\bitmaps\fdem2.bmp", ;
"..\bitmaps\fdem9.bmp" } ), ;
oBrw:Color:bBmpData := { |v| AScan( aClr, v ) } )
return nil
Regards
G. N. Rao.
Hyderabad, India
G. N. Rao.
Hyderabad, India
- damianodec
- Posts: 422
- Joined: Wed Jun 06, 2007 2:58 pm
- Location: Italia
- Contact:
Re: xbrowse icon and filter
thank you!!!
next step is filter for each column.
the example of Mark is good for me.
Any example ?
next step is filter for each column.
the example of Mark is good for me.
Any example ?
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)
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
- Marc Venken
- Posts: 1481
- Joined: Tue Jun 14, 2016 7:51 am
- Location: Belgium
Re: xbrowse icon and filter
I use 2 sort of filters.
1. Filters created by me and let the user select them from a pulldown menu. (Filters are stored in dbf file and used corresponding a specific XBrwowse
These filters are not for change by user
2. Use the build-in filter system from xbrowse using aBarGet system. (every column can have a filter field... the yellow get, see pic posted before)
I use this in almost all xbrowsers because the filters can be made in many combinations.
Mostly I store filters that I made from option 2 and think of using more in the future, in the system of option 1 by clicking a hotkey
1. Filters created by me and let the user select them from a pulldown menu. (Filters are stored in dbf file and used corresponding a specific XBrwowse
These filters are not for change by user
2. Use the build-in filter system from xbrowse using aBarGet system. (every column can have a filter field... the yellow get, see pic posted before)
I use this in almost all xbrowsers because the filters can be made in many combinations.
Mostly I store filters that I made from option 2 and think of using more in the future, in the system of option 1 by clicking a hotkey
Marc Venken
Using: FWH 23.08 with Harbour
Using: FWH 23.08 with Harbour