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

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

delphi valuelisteditor控件的使用

發(fā)布時(shí)間:2025/3/15 编程问答 22 豆豆
生活随笔 收集整理的這篇文章主要介紹了 delphi valuelisteditor控件的使用 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
delphi valuelisteditor控件的使用 2010-04-21 16:49

1.獲取valuelisteditor的value的值:

?? str := valuelisteditor.value['top']; top為key的內(nèi)容。

2. 獲取valuelisteditor的key值:

?? str:=valuelisteditor.key[0]; 獲取第0 個(gè)key值。

3.插入一行數(shù)據(jù)

valuelisteditor.InsertRow('pp','pp1',true);
//第一個(gè)參數(shù):key的值(字符串型)
//第二個(gè)參數(shù): value的值(字符串型)
//第三個(gè)參數(shù):是否追加,TRUE在最后一行加上一行,FALSE在獲得焦點(diǎn)的一行的后面加上一行.

4. 刪除一行數(shù)據(jù)

ValueListEditor1.DeleteRow(2);

5.如何選擇行列
 當(dāng)前選中的行通過(guò)currrow:=Valuelisteditor1.row獲得
 當(dāng)前選中的列通過(guò)currcol:=ValueListEditor1.col獲得

6.ValueListEditor,用string.clean清除!

7.一個(gè)key值,多個(gè)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;

另一個(gè)方法

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位技術(shù)專家面對(duì)面20年技術(shù)見(jiàn)證,附贈(zèng)技術(shù)全景圖

總結(jié)

以上是生活随笔為你收集整理的delphi valuelisteditor控件的使用的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。