delphi valuelisteditor控件的使用
来源:互联网 发布:百度申诉 网络异常 编辑:程序博客网 时间:2024/06/05 15:48
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的使用
- disabled和readonly区别
- 驾驭你的“职场布朗运动”
- 强制垃圾回收
- hibernate映射文件
- 4G牌照或年内下发 中移动固网资源缺失成掣肘
- delphi valuelisteditor控件的使用
- find的使用
- 查询每组数据中最新月份的记录
- 多线程中afxMessageBox
- Linux 和对称多处理
- windows 查看端口占用情况
- iOS开发:避免MPMoviePlayerViewController播放完毕后自动dismiss,进入后台自动dismiss
- SimpleDateFormat 多线程环境下慎用,会报异常
- 给定一个链表,怎么判断链表中存储的数据是回文