How to change default background selected color of dcbrowse

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
pedroah
Posts: 28
Joined: Wed Nov 05, 2014 7:15 pm
Location: Dominican Republic
Contact:

How to change default background selected color of dcbrowse

#1 Post 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

Wolfgang Ciriack
Posts: 484
Joined: Wed Jan 27, 2010 10:25 pm
Location: Berlin Germany

Re: How to change default background selected color of dcbro

#2 Post 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()
_______________________
Best Regards
Wolfgang

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: How to change default background selected color of dcbro

#3 Post 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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

User avatar
pedroah
Posts: 28
Joined: Wed Nov 05, 2014 7:15 pm
Location: Dominican Republic
Contact:

Re: How to change default background selected color of dcbro

#4 Post by pedroah »

Wolfgang

Works great

Thanks for the solution and for your time

Post Reply