jahlxx Posted August 10, 2016 Posted August 10, 2016 hi. how can I create a clone of a form in run time? I have a form and I need to have copies to be called feom other forms. thanks. Quote
Oliver Morsch Posted August 10, 2016 Posted August 10, 2016 When you create the form, choose "free form" (not "apllication form"). Then you can use: MyFormCopy := TMyForm.Create(uniApplication); MyFormCopy.Show; Quote
jahlxx Posted August 10, 2016 Author Posted August 10, 2016 the original form must be free form? Quote
Oliver Morsch Posted August 10, 2016 Posted August 10, 2016 It should be free form, because you should not use the function "MyForm" generated in application form. This function handles (creates and destroys automaticly) only one instance per session. Quote
jahlxx Posted August 18, 2016 Author Posted August 18, 2016 ok. I do: xxf: TUniForm; xxf:= Tffilter.Create(uniApplication); xxf.Show; this creates the clone ok. And in the form that creates the clone, I do; xxf.edit1.text := 'xxxxx'; this sentence, raises a compilation error; undeclared identifier edit1. any idea? thanks. Quote
Oliver Morsch Posted August 18, 2016 Posted August 18, 2016 xxf: TUniForm; ... xxf.edit1.text := 'xxxxx'; this sentence, raises a compilation error; undeclared identifier edit1. any idea? xxf is TUniForm and TUniForm has no edit1: (1) XXF: Tffilter; or (2) (xff as tffilter).edit1.text := 'xxxxx' Quote
jahlxx Posted August 25, 2016 Author Posted August 25, 2016 Hi. xxf:Tffilter, raises a compilation error. Tffilter is not defined. Tha option that works for me is: xxf: TUniForm and (xff as tffilter).edit1.text := 'xxxxx' Thanks to all. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.