IDE: TDataModule minimum size 150x150

git-svn-id: trunk@38110 -
This commit is contained in:
mattias 2012-08-01 21:18:48 +00:00
parent 6c8d7c1dae
commit 3f599eaa55
2 changed files with 4 additions and 3 deletions

View File

@ -1013,7 +1013,7 @@ function TJITComponentList.DoCreateJITComponent(
const NewComponentName, NewClassName, NewUnitName: shortstring;
AncestorClass: TClass; Visible, DisableAutoSize: boolean):integer;
var
Instance:TComponent;
Instance: TComponent;
ok: boolean;
Action: TModalResult;
OldSetCaption: boolean;
@ -1059,6 +1059,7 @@ begin
if OldSetCaption then
TControl(Instance).ControlStyle:=TControl(Instance).ControlStyle+[csSetCaption];
end;
// set class name
DoRenameClass(FCurReadClass,NewClassName);
ok:=true;
//debugln('[TJITForms.DoCreateJITComponent] Initialization was successful! FormName="',NewFormName,'"');

View File

@ -1307,8 +1307,8 @@ begin
// data module
with TDataModule(NewComponent) do
begin
if CompWidth <= 0 then CompWidth := Max(50, DesignSize.X);
if CompHeight <= 0 then CompHeight := Max(50, DesignSize.Y);
if CompWidth <= 0 then CompWidth := Max(150, DesignSize.X);
if CompHeight <= 0 then CompHeight := Max(150, DesignSize.Y);
MonitorBounds := ActiveMonitor.BoundsRect;
if CompLeft < MonitorBounds.Left + PreferredDistanceMin then
with MonitorBounds do