<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.28.1">
</HEAD>
<BODY>
Thanks, IK and also to Andew Brunner who also replied.<BR>
<BR>
For some reason, I was thinking that the TEdit.Create(Form1) established Form1 as parent. Anyhow, I set the parent and life is good again. Many thanks.<BR>
<BR>
Best regards,<BR>
Dennis<BR>
<BR>
On Fri, 2010-01-15 at 21:22 +0200, ik wrote:
<BLOCKQUOTE TYPE=CITE>
What about adding position of left and top and also Form1 as parent ?<BR>
<BR>
with TEdit.Create(Form1) do begin<BR>
Visible:=True;<BR>
Enabled:=True;<BR>
Name:='TestEdit"+IntToStr(i);<BR>
///////////////////////////////<BR>
Left := 50;<BR>
top := 100;<BR>
Parent := Form1;<BR>
////////////////////////////////<BR>
Show; //tried this in desperation but no success.<BR>
Form1.Refresh //this did not produce a visible new component either.<BR>
end;<BR>
<BR>
<BR>
<A HREF="http://ik.homelinux.org/">http://ik.homelinux.org/</A><BR>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
2010/1/15 Dennis M. Linton <<A HREF="mailto:dennis@dmlinton.net">dennis@dmlinton.net</A>>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
I am having trouble figuring out how to show visual components created programmatically. I seem to be able to, for example, do this:<BR>
<BR>
An integer, i, is declared in the public section. <BR>
<BR>
with TEdit.Create(Form1) do begin<BR>
Visible:=True;<BR>
` Enabled:=True;<BR>
Name:='TestEdit"+IntToStr(i);<BR>
Show; //tried this in desperation but no success.<BR>
Form1.Refresh //this did not produce a visible new component either.<BR>
end;<BR>
<BR>
The edit box seems to be created as Form1.ComponentCount increases and the Name generated is shown in another edit box.<BR>
<BR>
My problem is that I cannot get the new edit box to be visible (I even had code to ensure that .Top and .Left were such that the new component would be located within the Form1 coordinates. Can anyone tell me what I am doing wrong.<BR>
<BR>
Thanks in advance.<BR>
<BR>
Best regards,<BR>
Dennis<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
<BR>
</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BLOCKQUOTE>
<BR>
--<BR>
_______________________________________________<BR>
Lazarus mailing list<BR>
<A HREF="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</A><BR>
<A HREF="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</A><BR>
<BR>
</BLOCKQUOTE>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<BR>
<BR>
</BLOCKQUOTE>
<BLOCKQUOTE TYPE=CITE>
<PRE>
--
_______________________________________________
Lazarus mailing list
<A HREF="mailto:Lazarus@lists.lazarus.freepascal.org">Lazarus@lists.lazarus.freepascal.org</A>
<A HREF="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</A>
</PRE>
</BLOCKQUOTE>
<BR>
<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
<PRE>
--
Dennis M. Linton, P.Eng.
Tel: +1 (613) 473-1015
Cell: +1 (705) 312-1336
SMS: +1 (613) 922-2838
Skype: thedmlinton
</PRE>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>