FOR lnCntr = 1 TO ...
lcButtonName = "Mybutton" + TRANSFORM( lnCntr )
ThisForm.addobject( lcButtonName, "myclasslib")
loButton = EVAL( "ThisForm." + lcButtonName )
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--