>Good day,
>
>I was wondering how to add objects inside a container?
>
>Thanks in advance.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The other example show you how to do it manually (design time).
Below, is code you can use programatically (run-time).
Cut & Paste or you can get the formatted source code from:
http://www.VisualFoxPro.com/Source/JocylynSy.pr(Rename the .pr file to .prg when saving)
Pierre Demester
demester@VisualFoxPro.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PUBLIC oForm
* Create a Form object
oForm = CREATEOBJECT('form')
cName = ''
* Set Properties of the Form object
WITH oForm
.BorderStyle = 1
.AutoCenter = .T.
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Create a Container object inside the Form Object
.AddObject('oCont','container')
* Set Properties of the Container object
WITH .oCont
.Top = 5
.Left = 5
.Width = .Parent.Width - (.Left * 2)
.Height = .Parent.Height - (.Top * 2)
.SpecialEffect = 1
.Visible = .T.
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Create a Container object inside the Form Object
.AddObject('oCont','container')
* Set Properties of the Container object
WITH .oCont
.Top = 5
.Left = 5
.Width = .Parent.Width - (.Left * 2)
.Height = .Parent.Height - (.Top * 2)
.SpecialEffect = 1
.Visible = .T.
ENDWITH
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ENDWITH
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.Show()
ENDWITH