Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating buttons on the fly
Message
 
 
À
23/11/2001 10:34:30
Mario Glas
ProSysPlus Europe
Weert, Pays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00585132
Message ID:
00585135
Vues:
18
FOR lnCntr = 1 TO ...
  * Create name for the current button
  lcButtonName = "Mybutton" + TRANSFORM( lnCntr )
  * Add button to form
  ThisForm.addobject( lcButtonName, "myclasslib")
  * Get reference to it
  loButton = EVAL( "ThisForm." + lcButtonName )
  * Change properties
  WITH loButton 
      .Caption = "..."
      .Top = ...
      .Left = ...
      ...
  ENDWITH
ENDFOR
>Hi,
>
>I want to create a number of buttons every time a user resizes that form.
>The number of buttons is different every time.
>
>The name of the button is in a variable + a unique number.
>When i create the button with ThisForm.addobject(variable-name,classname), i cann't use the variable-name anymore to change the properties of the button
>
>How can i change the properties of these buttons because i cann't call a button with the variable name ?
>
>The source code is in "For" loop for every time this button has to be created.
>
>Who can help me, i'm just starting with FoxPro.
>
>Mario Glas
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform