Jens,

I have to disagree :



break on

global $ctrls[5]

$form         = createobject("Kixtart.Form")
$form.Caption = "Control Arrays"

for $i = 0 to ubound($ctrls)
   $ctrls[$i]            = "btn$i","MyFunction($i)"
   $ctrls[$i][0]         = $form.Button("Button $i",20,$i*30,80,25)
   $ctrls[$i][0].On Click = "" + $ctrls[$i][1]
next

$form.show

while $form.Visible
   $ = execute($form.DoEvents)
loop

quit ()

function MyFunction($i)
   $box = $form.MsgBox("Button # $i was clicked","Button down",64)
endfunction




Jochen

PS: remove the space in On Click

[ 07. January 2003, 16:06: Message edited by: jpols ]
_________________________