Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 29 Mar 2024, 11:50

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 02 Jan 2023, 15:47 
Offline

Joined: 15 Mar 2021, 16:33
Posts: 37
Hi

I want to change the SearchPanel color in ehlib grid( see #1 in picture ) and change the scope search language(english) to other (see #2 in picture)

thank you

Best Regards


Attachments:
ehlib.jpg
ehlib.jpg [ 43.68 KiB | Viewed 983 times ]
Top
 Profile  
 
PostPosted: 12 Jan 2023, 22:43 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Quote:
I want to change the SearchPanel color in ehlib grid( see #1 in picture )

Unfortunately, this part is hardcoded.
You need to modify TDBGridSearchPanelControlEh.GetPaintColors method

Code:
procedure TDBGridSearchPanelControlEh.GetPaintColors(var FromColor, ToColor,
  HighlightColor: TColor);
var
  Grid: TCustomDBGridEhCrack;
begin
  Grid := TCustomDBGridEhCrack(Owner);
  Grid.SetPaintColors;
  FromColor := Grid.FInternalColor;
  ToColor := Grid.FInternalFixedColor;
  if FindEditor.Focused then
  begin
    HighlightColor := StyleServices.GetSystemColor(clHighlight);
    FromColor := GetNearestColor(Canvas.Handle, LightenColorEh(Grid.FInternalColor, HighlightColor, True));
    ToColor := GetNearestColor(Canvas.Handle, LightenColorEh(Grid.FInternalColor, HighlightColor, True));
  end;
end;



Quote:
and change the scope search language(english) to other (see #2 in picture)

You can change properties of a global class TEhLibLanguageConsts.
Use
function EhLibLanguageConsts: TEhLibLanguageConsts in EhLibLangConsts unit to get access to the class

change property values in the initialization of your main unit.

Code:
unit Unit1;
...
initialization
  EhLibLanguageConsts.BeginsWithEh := 'BeginsWith Test';
  EhLibLanguageConsts.TheEntireGridEh := 'EntireGrid Test';
end.


or change values directly in the EhLibLangConsts.dfm file.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group