Page 1 of 1

How to change default background selected color of dcbrowse

Posted: Thu Nov 13, 2014 8:34 pm
by pedroah
Please can you tell me how to change the background color of the selected items in a grid, which is a deep blue and I want color associated with my application colors.

Thanks in advance

Re: How to change default background selected color of dcbro

Posted: Thu Nov 13, 2014 10:57 pm
by Wolfgang Ciriack
You can set the default values for Browses with

Code: Select all

DC_BrowPres({ ;
   {XBP_PP_COMPOUNDNAME, mybrowsefont }, ;
   {XBP_PP_COL_DA_FGCLR, myfgcolor }, ;
   {XBP_PP_COL_DA_BGCLR, mybgcolor}, ;
   {XBP_PP_HILITE_FGCLR, myhlfgcolor }, ;
   {XBP_PP_HILITE_BGCLR, myhlbgcolor }, ;
   {XBP_PP_COL_DA_ROWHEIGHT, myrowheight }, ;
   {XBP_PP_COL_DA_CELLHEIGHT, mycellheigt }, ;
   {XBP_PP_COL_HA_COMPOUNDNAME, myheaderfont } ;
  })
So for your needs is the {XBP_PP_HILITE_BGCLR, myhlbgcolor} parameter the choice.
In your Browse simply add

Code: Select all

...DCBROWSE... PRESENTATION DC_BrowPres()

Re: How to change default background selected color of dcbro

Posted: Fri Nov 14, 2014 12:59 am
by Tom
This won't work if a manifest file is available (linked to the app or <myapp>.exe.manifest) and visual themes are active. Windows XP or 7 will draw a rounded gradient box, Windows 8/8.1 a transparent rectangle with border, always based on system colors. The only way to change this with 1.9 is ownerdrawing, 2.0 supports HTML/CSS, but I didn't try this yet.

Re: How to change default background selected color of dcbro

Posted: Fri Nov 14, 2014 9:56 am
by pedroah
Wolfgang

Works great

Thanks for the solution and for your time