function GetButtonEditValue(bedt: TccButtonEdit): string;
var
i: integer;
j: Integer;
strList: TStringList;
begin
if not bedt.MultiSelect then
raise Exception.Create('本方法只支持MultiSelect为True的ButtonEdit');
strList := TStringList.Create;
try
strList.Delimiter := ',';
strList.DelimitedText := bedt.Text;
Result := '';
for i:=0 to strList.Count-1 do
begin
j := bedt.Items.IndexOf(strList[i]);
if j>-1 then
begin
if Result='' then
Result := bedt.Values[j]
else
Result := Result+','+bedt.Values[j];
end;
end;
finally
strList.Free;
end;
end;