首页 技术 正文
技术 2022年11月21日
0 收藏 426 点赞 3,972 浏览 3857 个字

Flexible adjustment of a lookup inplace editor

没有输入拼音码搜索功能。

GridEh Lookup

Drop-Down Forms

这个比较符合中国人的习惯,搜索框,不错,点下来箭头才能弹出,能不能输入字母进入搜索。

EhLib allows to create Drop-down Forms that can be shown on pressing of edit button in the text editors.

GridEh的列有这个事件

curGrid->Columns->Items[]->DropDownFormParams->DropDownForm;__property TCustomForm* DropDownForm ;
__property UnicodeString DropDownFormClassName ;
__property TDropDownAlign Align ;
__property TDropDownPassParamsEh PassParams ;
__property UnicodeString PassFieldNames ;
__property UnicodeString AssignBackFieldNames ;
__property int FormWidth ;
__property int FormHeight ;
__property bool SaveFormSize ;void __fastcall TFrm::DBGridEh1Columns0OpenDropDownForm(TCustomDBGridEh *Grid, TColumnEh *Column, TEditButtonEh *Button, TCustomForm *&DropDownForm, TDynVarsEh *DynParams)

GridEh Lookup

TDBLookupComboboxEh

GridEh Lookup

Search panel

DBGridEh can display a special panel to search and filter the data in the grid.

curGrid->SearchPanel->FilterOnTyping,以下属性,很好用。

__property bool Enabled ;
__property bool PersistentShowing ;
__property TShortCut ShortCut;
__property TSearchPanelLocationEh;
__property bool FilterOnTyping;//输入字母实时过滤
__property bool FilterEnabled;

GridEh Lookup

Data grouping

Grid allows to group data using columns as a criterion of grouping.

It is allowed to display a grid summarizing the records for each group, and the overall record summarizing the bottom of the grid.

需要用到MemTableEh1,DataSetDriverEh1,用普通的adoquery和fdmemtable,clientdataset不能显示。用memtableeh就可以分组了。

DBGridEh2->DataGrouping

    __property bool Active  ;
__property TGridDataGroupLevelsEh* GroupLevels ;
__property TGridDataGroupFootersEh* Footers ;
__property TGridDataGroupFootersDefValuesEh* FootersDefValues ;
__property bool GroupPanelVisible ;
__property bool DefaultStateExpanded ;
__property TGridDataGroupRowDefValuesEh* GroupRowDefValues ;
__property bool ShiftFolldataGroupRow ;

From http://ymg97526.blog.163.com/blog/static/173658160201122695449603/

procedure TForm1.FormCreate(Sender: TObject);var i:Integer;begin//DBGridEh1.Flat:=True;DBGridEh1.ColumnDefValues.Title.Alignment:=taCenter;DBGridEh1.DataSource:=DataSource1;DataSource1.DataSet:=MemTableEh1;MemTableEh1.DataDriver:=DataSetDriverEh1;MemTableEh1.CachedUpdates:=True;MemTableEh1.FetchAllOnOpen:=True; //打开获取所有记录DataSetDriverEh1.ProviderDataSet:=ADOQuery1;ADOQuery1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;'+          'Data Source=f:\mcmygs.mdb;'+          'Persist Security Info=False;'+          'Jet OLEDB:Database Password=123456';ADOQuery1.Close;ADOQuery1.SQL.Text:='Select cyear,cmonth,fphm,bhsje,se,jshj from zyfp';ADOQuery1.Open;MemTableEh1.Active:=True;DBGridEh1.DataGrouping.Active:=True;//DBGridEh1.DataGrouping.DefaultStateExpanded:=True; //默认为展开状态DBGridEh1.DataGrouping.GroupPanelVisible:=True;DBGridEh1.DataGrouping.GroupLevels.Add.Column:=DBGridEh1.Columns[];DBGridEh1.DataGrouping.GroupLevels.Add.Column:=DBGridEh1.Columns[];//DBGridEh1.Columns[0].Visible:=False;//DBGridEh1.Columns[1].Visible:=False;DBGridEh1.DataGrouping.Font.Style:=[fsBold];//DBGridEh1.DataGrouping.Color:=clSkyBlue;DBGridEh1.TitleFont.Color:=clBlue;DBGridEh1.GridLineColors.DarkColor:=clRed;//DBGridEh1.GridLineColors.BrightColor:=clBlack;DBGridEh1.ColumnDefValues.Title.Alignment:=taCenter;for i:= to MemTableEh1.Fields.Count- do  begin    if MemTableEh1.Fields[i].DataType=ftFloat then       DBGridEh1.Columns[i].DisplayFormat:='#,###,###.00';  end;end;

GridEh Lookup

DropDown filter list

Grid allows to filter data using a droped down list box where users can select items for filtering using checkboxes.

DBGridEh2->STFilter->Visible;

还是要用MemTableEh1才起作用。

    __property bool InstantApply  ;
__property bool Local ;
__property TSTFilterLocationEh Location ;
__property bool Visible ;
__property TColor HorzLineColor ;
__property int RowHeight ;
__property int RowLines ;
__property TColor VertLineColor ;
__property TDBGridFilterButtonDrawTimeEh FilterButtonDrawTime ;

GridEh Lookup

ObjectInspector Form

Global function to display a ObjectInspector-like Form.
This is a simple ObjectInspector that can be used to debug
property setting at run-time。

TObjectInspectorEh

添加Common\ObjectInspectorEh.pas文件,写2行代码就OK,我只能说太方便了。

TRect rect(, , , );
ShowObjectInspectorForm(curGrid, rect, false);

GridEh Lookup

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,965
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,486
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,331
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,114
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,747
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,781