|
楼主 |
发表于 2007-4-20 13:11:48
|
显示全部楼层
搞定了。实在是看晕了
procedure TSimpleSQLFilterEditor.CreateEditors;
begin
FImage := TImage.Create(Self);
FImage.Transparent := True;
FImage.OnClick := DoClick;
LayoutControl(FImage, 6, 0, 18, 18);
FLeftEdit := TSimpleSQLFilterComboBox.Create(Self);
FLeftEdit.Style := TComboBoxStyle.csDropDownList;
FLeftEdit.DropDownCount := 20;
FLeftEdit.OnChange := DoFieldChanged;
FLeftEdit.OnFocusChanged := DoFocusChanged;
//LayoutControl(FLeftEdit, 35, 0, 145, 20);
LayoutControl(FLeftEdit, 35, 0, 245, 20); //AWidth, +100
FRelationOpr := TSimpleSQLFilterComboBox.Create(Self);
FRelationOpr.Style := TComboBoxStyle.csDropDownList;
FRelationOpr.DropDownCount := 20;
FRelationOpr.OnChange := DoRelationChanged;
FRelationOpr.OnFocusChanged := DoFocusChanged;
//LayoutControl(FRelationOpr, 187, 0, 93, 20);
LayoutControl(FRelationOpr, 287, 0, 93, 20); //ALeftOffset, +100
FRightEdit := TSimpleSQLFilterComboBox.Create(Self);
FRightEdit.DropDownCount := 20;
FRightEdit.AutoDetectWidth := True;
FRightEdit.OnFocusChanged := DoFocusChanged;
FRightEdit.OnChange := DoExprChanged;
FRightEdit.OnDropDown := DoDropDown;
//LayoutControl(FRightEdit, 287, 0, 145, 20);
LayoutControl(FRightEdit, 387, 0, 145, 20); //ALeftOffset, +100
FBetweenLabel := TLabel.Create(Self);
FBetweenLabel.Visible := False;
FBetweenLabel.Caption := 'AND';
//LayoutControl(FBetweenLabel, 439, 5, 18, 12);
LayoutControl(FBetweenLabel, 539, 5, 18, 12); //ALeftOffset, +100
FBetweenEdit := TSimpleSQLFilterComboBox.Create(Self);
FBetweenEdit.Visible := False;
FBetweenEdit.OnFocusChanged := DoFocusChanged;
FBetweenEdit.OnChange := DoExprChanged;
FBetweenEdit.OnDropDown := DoDropDown;
//LayoutControl(FBetweenEdit, 469, 0, 145, 20);
LayoutControl(FBetweenEdit, 569, 0, 145, 20); //ALeftOffset, +100
FBooleanOpr := TSimpleSQLFilterComboBox.Create(Self);
FBooleanOpr.Style := TComboBoxStyle.csDropDownList;
FBooleanOpr.OnFocusChanged := DoFocusChanged;
FBooleanOpr.OnChange := DoBoolChanged;
//LayoutControl(FBooleanOpr, 439, 0, 50, 20);
LayoutControl(FBooleanOpr, 539, 0, 50, 20); //ALeftOffset, +100
FOprKind := TOprKind.okBinary;
FIsINOpr := False;
end; |
|