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;
View Code

2、根据ComBox的选择,程序改变

SetOrdProp(DBGridEh1.BackgroundData, 'Placement', DBComboBoxEh1.ItemIndex);

 

posted on 2018-10-16 16:03  EEEEEEEEEEEEEEEEEEE  阅读(338)  评论(0编辑  收藏  举报