日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

delphi valuelisteditor控件的使用

發布時間:2025/3/15 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 delphi valuelisteditor控件的使用 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
delphi valuelisteditor控件的使用 2010-04-21 16:49

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;

與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的delphi valuelisteditor控件的使用的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。