Pass a Parmater into a Modal form ??
Publicado: Jue Dic 27, 2007 2:29 pm
Hi,
I think I should know how to do this but I dont ...
When showing a Form from a button, I would like to pass in a parameter or
maybe several ??
In the form to be shown I have my code looks like this ... I have added
PROPERTY cMode
CLASS InvoiceForm FROM TForm
PROPERTY cMode INIT "" ----------- This is added by me
COMPONENT oGroupBox1
COMPONENT oGroupBox2
COMPONENT oLineBrowse
METHOD CreateForm()
METHOD FormInitialize( oSender )
ENDCLASS
My Calling code looks like this .....
METHOD NewBtnClick( oSender ) CLASS TMainForm
local oForm := InvoiceForm():New()
oForm:cMode := "ADD" ------------- but I dont think this is working ??
oForm:ShowModal()
RETURN Nil
I can put my cMode in the calling form & get the InvoiceForm to pick up from
the calling form ... but that seems poor practice.
So problem is "how to pass one or more parameters to a modal form called
from a button".
How does anyone else do this ??
Regards
Chris Gillard
I think I should know how to do this but I dont ...
When showing a Form from a button, I would like to pass in a parameter or
maybe several ??
In the form to be shown I have my code looks like this ... I have added
PROPERTY cMode
CLASS InvoiceForm FROM TForm
PROPERTY cMode INIT "" ----------- This is added by me
COMPONENT oGroupBox1
COMPONENT oGroupBox2
COMPONENT oLineBrowse
METHOD CreateForm()
METHOD FormInitialize( oSender )
ENDCLASS
My Calling code looks like this .....
METHOD NewBtnClick( oSender ) CLASS TMainForm
local oForm := InvoiceForm():New()
oForm:cMode := "ADD" ------------- but I dont think this is working ??
oForm:ShowModal()
RETURN Nil
I can put my cMode in the calling form & get the InvoiceForm to pick up from
the calling form ... but that seems poor practice.
So problem is "how to pass one or more parameters to a modal form called
from a button".
How does anyone else do this ??
Regards
Chris Gillard