如题,谢谢帮助
我添加Value列选单的时候用的是ValueListEditor1.ItemProps[0].PickList.Add('a1');
ValueListEditor1.ItemProps[0].PickList.Add('a2');
ValueListEditor1.ItemProps[0].PickList.Add('a3');
请问如果不能将Value列的资料读出,那么可否通过用方法记录user选择次序再由添加时候的顺序得到。
我添加Value列选单的时候用的是ValueListEditor1.ItemProps[0].PickList.Add('a1');
ValueListEditor1.ItemProps[0].PickList.Add('a2');
ValueListEditor1.ItemProps[0].PickList.Add('a3');
请问如果不能将Value列的资料读出,那么可否通过用方法记录user选择次序再由添加时候的顺序得到。
procedure TForm1.ValueListEditor1Validate(Sender: TObject; ACol,
ARow: Integer; const KeyName, KeyValue: String);
begin
ShowMessage(KeyValue);
end;当焦点离开下拉的时候,就会触发上面的事件
procedure TForm1.Button2Click(Sender: TObject);
begin
ShowMessage(ValueListEditor1.ItemProps['1'].KeyDesc);
end;楼主能否说的在详细点
ValueListEditor1.InsertRow('xx','',True);
ValueListEditor1.ItemProps[0].PickList.Add('True');
ValueListEditor1.ItemProps[0].PickList.Add('False');
當資料加載完畢后就需要供選擇某項結果是True or False,選擇完后我需要將這個ValueListEditor中的資料導出,我只知道能將Key的值導出,不知能不能將Value列的值也導出
ShowMessage(ValueListEditor1.Values['xx']);
procedure TForm1.Button4Click(Sender: TObject);
var
i:Integer;
begin
ValueListEditor1.InsertRow('xx','',True);
ValueListEditor1.ItemProps[0].PickList.Add('True');
ValueListEditor1.ItemProps[0].PickList.Add('False');
ValueListEditor1.InsertRow('yy','',True);
ValueListEditor1.ItemProps[1].PickList.Add('1');
ValueListEditor1.ItemProps[1].PickList.Add('2');
//
for i:=0 to ValueListEditor1.VisibleRowCount-1 do
begin
if ValueListEditor1.ItemProps[i]<>nil then
begin
if ValueListEditor1.ItemProps[i].HasPickList then
begin
ShowMessage(ValueListEditor1.ItemProps[i].PickList.Text);
end;
end;
end;
end;