adding parameters to ShowModal event
Posted on 2003-03-12
I am calling a form stored in another unit with the following code:
with TfrmStaffDetails.Create(self) do
The form I'm opening here has four different variations of what components are enabled/disabled when it is opened, I would like to be able to pass an integer (1,2,3 or 4) to it in the ShowModal or create event so that I can sort out all aspects of the layout without the new form having to access global variables to decide on the layout. i.e. I do not want global variables.
I tried overriding the ShowModal event and adding a parameter like so:
procedure ShowModal(layout:integer); override;
but I realise this is naive and won't work. Any ideas how I can pass paramaters to a form as I open it?