DBGRIDEH 关闭editbuttonclick选择后弹出窗体

本文详细介绍了如何在DBAxisGridsEh单元中修改编辑按钮的默认文本,通过覆盖TDBAxisGridEhCenter的EditButtonDefaultActionText过程实现。涉及的代码段展示了在不同条件下如何处理鼠标操作,以及如何使用ADropDownFormParams.CheckShowDropDownForm函数来响应用户交互。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在官网找到解决方法,修改DBAxisGridsEh单元

procedure TDBAxisGridEhCenter.EditButtonDefaultActionText(
  Grid: TCustomDBAxisGridEh; AxisBar: TAxisBarEh; EditControl: TControl;
  EditButton: TEditButtonEh; EditButtonControl: TEditButtonControlEh;
  IsMouseDown: Boolean; var Handled: Boolean);
...
    ADropDownFormParams.CheckShowDropDownForm(Handled);
  end else if (EditButton.Style = ebsEllipsisEh) and not IsMouseDown then
  begin
//    Text := DBEditControl.Text;
//    AEmptyRect := EmptyRect;
//    if ShowMemoEditDialogEhProg(Text, AEmptyRect) then
//    begin
//      Grid.DataLink.Edit;
//      DBEditControl.Text := Text;
//      Grid.UpdateText;
//      Grid.UpdateData;
//      Handled := True;
//    end;
  end;
end;

The history of the EhLib library -------------------------------- Version 6.1 + A new component TDBVertGridEh - DataSet Grid with the Vertical Orientation. The component is used to display and edi t a single record of DataSet in a vertical orientation. Basic properties of the TDBVertGridEh: Rows: TDBVerGridRows - A collection of items of TFieldRowEh type to display fields of a record. This is analogous to the Columns collection in TDBGridEh. Options: TDBVHGridOptions - Configure basic properties of the vertical grid. RowsDefValues: TFieldRowDefValuesEh - default values for line Grid row - TFieldRowEh. This is analogous of ColumnDefValues in TDBGridEh. GridLineParams: TDBVertGridLineParamsEh - Color settings of the dividing lines in vertical grid. DataColParams: TDBVertGridDataColParamsEh - The setting of the column with data. LabelColParams: TDBVertGridLabelColParamEh - The setting of the column with row label. See an example of using TDBVertGridEh in a project: <EhLib Archive> \ Demos \ DBVertGridEh.SimpleDemo \ Project1.dpr compiled project: <EhLib Archive> \ Demos \ Bin \ DBVertGridEh.SimpleDemo.Exe * There are changes in the grids inheritance tree: New inheritance tree is: TCustomControl | - TCustomGridEh | - TCustomDBAxisGridEh | - TCustomDBGridEh | | | - TDBGridEh | - TCustomDBVertGridEh | - TDBVertGridEh * Some constants and procedures are moved from the module DBGridEh to the DBAxisGridsEh. + Added a new global function to display a ObjectInspector-like Form. Use the next procedure to display the ObjectInspector-like Form: procedure ShowObjectInspectorForm ( Component: TObject; // A component to Inspect FormBounds: TRect; // Form Borders NewForm: Boolean = False // Show as a new Form ); This is a simple ObjectInspector that can be used to debug property setting at run-time. See an example that shows how to use ShowObjectInspectorForm here: <EhLib Archive> \ Demos \ ObjectInspectorForm.SimpleDemo \ Project1.dpr compiled project: <EhLib Archive> \ Demos \ Bin \ ObjectInspectorForm.SimpleDemo.Exe In DBGridEh + Added an ability to change the size of RowDetailPanel by mouse at RunTime. New properties in RowDetailPanel: property VertSizing: Boolean - Show an RowDetailPanel Splitter at the buttom of the RowDetailPanel. property MinHeight: Integer - Minimum height of the RowDetailPanel. property MaxHeight: Integer - Maximum height of the RowDetailPanel. property SizingBarBeveled: Boolean - Splitter area has a 3D border. property SizingBarHeight: Integer - The height of the Splitter. + Added an ability to darken gray the grid while the data is loading. See StartLoadingStatus and FinishLoadingStatus methods in the TDBGridEh. See the example that shows this opportunity in a project: <EhLib Archive> \ Demos \ DBGridEh.LoadingStatus \ Project1.dpr compiled project: <EhLib Archive> \ Demos \ Bin \ DBGridEh.LoadingStatus.Exe
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

trassion

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值