1、获取DbgrdiEH 某一个选项的属性、加载到ComBox
procedure TForm1.FormCreate(Sender: TObject);
var
PropInfo: PPropInfo;
PropType: PTypeInfo;
TypeData: PTypeData;
I: Integer;
begin
PropInfo := GetPropInfo(DBGridEh1.BackgroundData, 'Placement');
PropType := PropInfo_getPropType(PropInfo);
TypeData := GetTypeData(PropType); for I := TypeData^.MinValue to TypeData^.MaxValue do
begin
DBComboBoxEh1.Items.Add(GetEnumName(PropType, I));
end; Button1Click(nil); end;
2、根据ComBox的选择,程序改变
SetOrdProp(DBGridEh1.BackgroundData, 'Placement', DBComboBoxEh1.ItemIndex);