EhLib.Com https://forum.ehlib.com/en/ |
|
Editbutton without transparency https://forum.ehlib.com/en/viewtopic.php?f=5&t=1043 |
Page 1 of 1 |
Author: | danieldavila [ 21 May 2020, 12:27 ] |
Post subject: | Editbutton without transparency |
Is it possible to configure the Edit Button to always be drawn without transparency when the line is not selected? |
Author: | EhLibSupport [ 21 May 2020, 12:57 ] |
Post subject: | Re: Editbutton without transparency |
Hello Can you send a screenshot to understand in which component and in what place does this problem occur? |
Author: | danieldavila [ 21 May 2020, 14:15 ] |
Post subject: | Re: Editbutton without transparency |
Search in all settings, but in the grid in EditButton it looks like this: And I want it to look like this: |
Author: | danieldavila [ 22 May 2020, 14:00 ] |
Post subject: | Re: Editbutton without transparency |
? |
Author: | EhLibSupport [ 30 May 2020, 17:48 ] | ||
Post subject: | Re: Editbutton without transparency | ||
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.
|
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |