Has anyone experienced problems with large fonts when placing a frame
on a form at runtime?
If I just place the frame on my form at design time, there are no
problems. Every control in the frame stretches nicely when changing to
large fonts.
I create my frame at runtime like this:
procedure TForm1.FormCreate(Sender: TObject);
begin
UserGroupFrame := TFrameUserGroup.Create(self);
UserGroupFrame.Parent := Panel2;
UserGroupFrame.Align := alClient;
UserGroupFrame.AutoScroll := False;
end;
AutoScroll on the form is set to false;
Any help is appreciated!
Ole Fromberg
I do that all the time, no problems.
> If I just place the frame on my form at design time, there are no
> problems. Every control in the frame stretches nicely when changing to
> large fonts.
>
> I create my frame at runtime like this:
>
> procedure TForm1.FormCreate(Sender: TObject);
> begin
> UserGroupFrame := TFrameUserGroup.Create(self);
> UserGroupFrame.Parent := Panel2;
> UserGroupFrame.Align := alClient;
> UserGroupFrame.AutoScroll := False;
> end;
>
> AutoScroll on the form is set to false;
And the problem is?
--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be
Ole
"Peter Below (TeamB)" <10011...@compuXXserve.com> wrote in message
news:VA.00009dc...@antispam.compuserve.com...
If you create it at design-time then it is scaled with the form when the form
scales itself. If you create it at run-time that does not happen, of course,
since only *forms* are scaled automatically, if requested. You can try to use
the ScaleBy method the frame inherits from TWinControl to do the scaling
manually, after the frame has been created in code.
I design in large font mode only (my default since i'm quite myopic), use
TrueType fonts only, and set Scaled to false for all forms. No problems this
way if the app is run on small font systems.
procedure TForm1.FormCreate(Sender: TObject);
begin
UserGroupFrame := TFrameUserGroup.Create(self);
UserGroupFrame.Parent := panel2;
UserGroupFrame.Align := alClient;
UserGroupFrame.ScaleBy(width,549); // 549 is the forms width at design-time
end;
Thanks a lot!
Kind regards
Ole Fromberg
"Peter Below (TeamB)" <10011...@compuXXserve.com> wrote in message
news:VA.00009dd...@antispam.compuserve.com...