Hi All,
 I have an MDI application in which I have two forms. Form1 (Main form) and 
form2 (Child Form). In form 2 I have some TComboBox and TEdit Components. In 
the main form I have some TEdit components. I would like Form1(MainForm) 
TEditBox to have info from Form2(Child Form) TEditBox. I thought of two ways of 
doing this and would like to know if there is a better way
 
Method 1. TIniFile. When I close form2 I write to a .ini the contents of form2. 
Then When I Activate Form1 (OnActivate) I read the info from .ini and fill in 
the info into the TEdit.
 
Method 2. I use global variables. When I close Form2 I have global variables 
that store the contents of TEdit from Form2. When I go to Activate 
form1(OnActivate) I use the global variables and assign to the TEdit in Form1.
 
Please let me know if there is a better way. I do not feel too good about 
global variables since it is a little scary and not good practise and TIniFiles 
are a little cubersome. Is there a better way in Lazarus. Thanks
 
Lefti

Reply via email to