Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 21:05

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: 21 May 2020, 12:27 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
Is it possible to configure the Edit Button to always be drawn without transparency when the line is not selected?


Top
 Profile  
 
PostPosted: 21 May 2020, 12:57 
Offline

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

Can you send a screenshot to understand in which component and in what place does this problem occur?

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 21 May 2020, 14:15 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
Search in all settings, but in the grid in EditButton it looks like this:
Image

And I want it to look like this:
Image


Top
 Profile  
 
PostPosted: 22 May 2020, 14:00 
Offline

Joined: 24 Aug 2018, 13:15
Posts: 46
Location: Brazil
?


Top
 Profile  
 
PostPosted: 30 May 2020, 17:48 
Offline

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

You cannot change this behavior using the settings.
But you can change the transparency of the buttons if you inherit the grid and rewrite the GetDataEditButtonTransparency method.

Like this

Code:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, MemTableDataEh, Db, DBGridEhGrouping, ADODB, GridsEh, DBGridEh,
  MemTableEh, ToolCtrlsEh, DBGridEhToolCtrls, StdCtrls, Mask, DBCtrlsEh,
  ObjectInspectorEh,
  DBLookupEh, DynVarsEh, DBAxisGridsEh, EhLibVCL;

type
  TDBGridEh = class(DBGridEh.TDBGridEh)
  function GetDataEditButtonTransparency(ACol, ARow: Longint;
    AxisBar: TAxisBarEh; Params: TAxisColCellParamsEh; EditButton: TEditButtonEh): Integer; override;
  end;

type
  TForm1 = class(TForm)
    MemTableEh1: TMemTableEh;
    DBGridEh1: TDBGridEh;
    DataSource1: TDataSource;
    procedure FormKeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

function TDBGridEh.GetDataEditButtonTransparency(ACol, ARow: Longint;
  AxisBar: TAxisBarEh; Params: TAxisColCellParamsEh; EditButton: TEditButtonEh): Integer;
begin
  Result := 0;
end;

procedure TForm1.FormKeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = VK_F11 then
    ShowObjectInspectorForm(ActiveControl, Rect(Left+Width+10, Top, Left+Width+10+300, Top+Height));
end;

initialization
end.


Attachments:
sshot-112.png
sshot-112.png [ 6 KiB | Viewed 1536 times ]

_________________
Best regards
EhLib Support Team
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 5 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