Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Putting text in a string var in a newly created form before showing it ?
#2
Soron,

did you notice that TIWForm1 is defined in "type" section?

It is like

type
in=integer;

and what you do is

in:= 3;

We need a variable of the type to assign its value. Since all delphi components are dynamic variables we need to create them first. There are two ways described below. The first one is not safe as we use a global variable "f". So we create a temporary variable that works only within a "with" statement, described as the second example. It is a little tricky method. Since form.create returns a value, we can intercept the value using "with" the same way as we do it with record variables.

https://www.sql.ru/forum/561505/with-tform-create-do
Reply


Messages In This Thread
RE: Putting text in a string var in a newly created form before showing it ? - by karolm - 03-04-2020, 10:09 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)