delphi valuelisteditor控件的使用
来源:互联网 发布:sql server是数据库吗 编辑:程序博客网 时间:2024/05/20 08:26
1.获取valuelisteditor的value的值:
str := valuelisteditor.value['top']; top为key的内容。
2. 获取valuelisteditor的key值:
str:=valuelisteditor.key[0]; 获取第0 个key值。
3.插入一行数据
valuelisteditor.InsertRow('pp','pp1',true);
//第一个参数:key的值(字符串型)
//第二个参数: value的值(字符串型)
//第三个参数:是否追加,TRUE在最后一行加上一行,FALSE在获得焦点的一行的后面加上一行.
4. 删除一行数据
ValueListEditor1.DeleteRow(2);
5.如何选择行列
当前选中的行通过currrow:=Valuelisteditor1.row获得
当前选中的列通过currcol:=ValueListEditor1.col获得
6.ValueListEditor,用string.clean清除!
7.一个key值,多个value.
procedure TForm1.ValueListEditor1GetPickList(Sender: TObject;
const KeyName: String; Values: TStrings);
var
str:string;
begin
str:=self.ComboBox1.Text;
str:=leftStr(str,4);
if str='Edit' then
begin
if KeyName='BorderStyle' then
begin
Values[0]:='bssingle';
values[1]:='bsnone';
end;
end;
end;
另一个方法
ValueListEditor1.ItemProps[0].PickList.Add('a1');
ValueListEditor1.ItemProps[0].PickList.Add('a2');
ValueListEditor1.ItemProps[0].PickList.Add('a3');
第三种方法:
Index := ValueListEditor1.InsertRow('Size', '9', True);
with ValueListEditor1.ItemProps[Index - 1].PickList do
begin
Add('9');
Add('11');
Add('13');
Add('20');
end;
8。加入。。按钮
Index := ValueListEditor1.InsertRow('Color', 'clRed', True);
ValueListEditor1.ItemProps[Index - 1].EditStyle := esEllipsis;
procedure TForm1.ValueListEditor1EditButtonClick(Sender: TObject);
var
nRow: Integer;
begin
nRow := ValueListEditor1.Row;
case nRow of
2:
with TColorDialog.Create(nil) do
begin
if Execute then
ValueListEditor1.Cells[2, nRow] := ColorToString(Color);
end;
end;
end;
- delphi valuelisteditor控件的使用
- delphi valuelisteditor控件的使用
- Delphi控件的使用经验
- Delphi WebBrowser控件的使用
- Delphi使用VB6编写的ActiveX控件???
- delphi控件制作位图资源的使用
- Delphi 中使用 VB 开发的控件
- Delphi使用VB6编写的ActiveX控件???
- delphi中的realAudio ActiveX控件的使用
- Delphi下TWebBrowser控件的使用
- Delphi 下 VCLZip控件的简单使用
- Delphi使用VB开发的ActiveX控件
- Delphi中dxTreelist控件的使用
- Delphi 2010 TButtonGroup控件的使用
- Delphi 2010 TCategoryButtons控件的使用
- Delphi 皮肤控件AlphaControls的使用
- Delphi中MsComm控件的安装使用
- Delphi 皮肤控件AlphaControls的使用
- yuy2torgb24
- short int long
- 传球问题(组合数学问题)
- 使JSP/Servlet应用程序的八种方法
- MongoDB Nice,I like it very much
- delphi valuelisteditor控件的使用
- Windows Logon Type的含义
- CEGUI安装、编译、运行总结
- SQL Server(更改所有者、数据库恢复)
- 从MDF文件恢复SqlServer数据库
- linux的物理内存与线性地址空间布局--1
- configure serivce.clientconfig for Silverlight project
- 工作与刻意练习
- 三种不同的接口实现方式