Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to add objects inside a container?
Message
 
À
15/04/1999 06:45:47
Jocylyn Sy
Freelance Programmer
Cebu, Philippines
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00208497
Message ID:
00208738
Vues:
23
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform