Hi Roger,
Currently in the second browse, the text color never change when highlighted with the blue line (it stays black).
What setting should I use, so that in the second browse, it will make the text color white when highlighted?
I'm using your example in \Samples\Browse\browtype.prg
Best Regards,
Andy
in the first browse, the text in the blue line (highlighted line) is white, while the rest is black.Command to set text color when highlighted
-
- Posts: 103
- Joined: Fri Sep 17, 2010 2:58 am
-
- Posts: 36
- Joined: Thu Jan 28, 2010 2:30 pm
Re: Command to set text color when highlighted
Add these lines to your source:
Code: Select all
// Datalines highlite
//
Aadd(aBrwPres ,{XBP_PP_COL_DA_HILITE_FGCLR,GRA_CLR_WHITE}) // Hilite FG color
Aadd(aBrwPres ,{XBP_PP_COL_DA_HILITE_BGCLR,GRA_CLR_BLUE}) // Hilite BG color
//
Best regards
Leon
Leon
-
- Posts: 103
- Joined: Fri Sep 17, 2010 2:58 am
Re: Command to set text color when highlighted
Hi Leon,Leon Berger wrote:Add these lines to your source:
Code: Select all
// Datalines highlite // Aadd(aBrwPres ,{XBP_PP_COL_DA_HILITE_FGCLR,GRA_CLR_WHITE}) // Hilite FG color Aadd(aBrwPres ,{XBP_PP_COL_DA_HILITE_BGCLR,GRA_CLR_BLUE}) // Hilite BG color //
I've already have those in the source, but it's still not working.
I'm using express++ 1.9.260 and xBase 1.9.331
Any other ideas?
This is the Init_BrowseColors function.
Code: Select all
Procedure Init_BrowseColors()
LOCAL aBrwPres := {}
//
// 12-03-2011 Default browse parameters
//
// Header details
//
Aadd(aBrwPres ,{XBP_PP_COL_HA_FGCLR,BRW_HA_FGCOLOR}) // Header FG Color
Aadd(aBrwPres ,{XBP_PP_COL_HA_BGCLR,BRW_HA_BGCOLOR}) // Header BG Color
Aadd(aBrwPres ,{XBP_PP_COL_HA_HEIGHT,-1}) // Header height (Based on Fontsize)
Aadd(aBrwpres ,{XBP_PP_COL_HA_COMPOUNDNAME,APP_BROWSEFONT}) // Font in browse
//
// Dataline details
//
Aadd(aBrwPres ,{XBP_PP_COL_DA_ROWSEPARATOR,XBPCOL_SEP_NONE}) // Row seperator
Aadd(aBrwPres ,{XBP_PP_COL_DA_COLSEPARATOR,XBPCOL_SEP_DOTTED}) // Col seperator
Aadd(aBrwPres ,{XBP_PP_COL_DA_FGCLR,GRA_CLR_BLACK}) // Row FG color
Aadd(aBrwPres ,{XBP_PP_COL_DA_BGCLR,GRA_CLR_WHITE}) // Row BG color
Aadd(aBrwPres ,{XBP_PP_COL_DA_ROWHEIGHT,-1}) // Row height (Based on Fontsize)
Aadd(aBrwpres ,{XBP_PP_COL_DA_COMPOUNDNAME,APP_BROWSEFONT}) // Font in browse
Aadd(aBrwPres ,{XBP_PP_COL_DA_FRAMELAYOUT,1}) // Browse outline
Aadd(aBrwPres ,{XBP_PP_COL_DA_CELLFRAMELAYOUT,2}) // Cell outline
//
// Datalines highlite
//
Aadd(aBrwPres ,{XBP_PP_COL_DA_HILITE_FGCLR,GRA_CLR_WHITE}) // Hilite FG color
Aadd(aBrwPres ,{XBP_PP_COL_DA_HILITE_BGCLR,GRA_CLR_BLUE}) // Hilite BG color
//
// Footer details
//
Aadd(aBrwPres ,{XBP_PP_COL_FA_FGCLR,BRW_HA_FGCOLOR}) // Footer FG Color
Aadd(aBrwPres ,{XBP_PP_COL_FA_BGCLR,BRW_HA_BGCOLOR}) // Footer BG Color
Aadd(aBrwPres ,{XBP_PP_COL_FA_HEIGHT,-1}) // Footer height (Based on Fontsize)
Aadd(aBrwpres ,{XBP_PP_COL_FA_COMPOUNDNAME,APP_BROWSEFONT}) // Font in browse
//
// Zebra details
//
Aadd(aBrwPres ,{XBP_PP_COL_ZEBRA_EVENROW_BGCLR,BRW_ZEBRA_EVEN_BGCOLOR}) // Zebra even row BG color
Aadd(aBrwPres ,{XBP_PP_COL_ZEBRA_EVENROW_FGCLR,BRW_ZEBRA_EVEN_FGCOLOR}) // Zebra even row FG color
Aadd(aBrwPres ,{XBP_PP_COL_ZEBRA_ODDROW_BGCLR ,BRW_ZEBRA_ODD_BGCOLOR}) // Zebra odd row BG color
Aadd(aBrwPres ,{XBP_PP_COL_ZEBRA_ODDROW_FGCLR ,BRW_ZEBRA_ODD_FGCOLOR}) // Zebra odd row FG color
Aadd(aBrwPres ,{XBP_PP_COL_ZEBRA_ENABLED,1}) // Enable standard zebra colour
Dc_BrowPres(aBrwPres)
Return
-
- Posts: 36
- Joined: Thu Jan 28, 2010 2:30 pm
Re: Command to set text color when highlighted
Maybe you should use xBase 1.9.355.Andy Edward wrote:I'm using express++ 1.9.260 and xBase 1.9.331
Any other ideas?
Best regards
Leon
Leon
-
- Posts: 484
- Joined: Wed Jan 27, 2010 10:25 pm
- Location: Berlin Germany
Re: Command to set text color when highlighted
I am setting the colors for background of columns with COLOR {nil, GRA_CLR_....}, that do not change the hilitecolor in DCBROWSE.
_______________________
Best Regards
Wolfgang
Best Regards
Wolfgang
-
- Posts: 103
- Joined: Fri Sep 17, 2010 2:58 am
Re: Command to set text color when highlighted
So whenever there is a color set for the row/column in browse, hilitecolor for the FG (foreground) setting is ignored?Wolfgang Ciriack wrote:I am setting the colors for background of columns with COLOR {nil, GRA_CLR_....}, that do not change the hilitecolor in DCBROWSE.
Regards,
Andy
Re: Command to set text color when highlighted
try to use
Code: Select all
oBrowse:DataArea:useVisualstyle := .F.
greetings by OHR
Jimmy
Jimmy