I tried:
Code: Select all
FOR I:=1 to 6
@ 200,100 BUTTONBMP aBtn[I] OF oGrund ACTION MsgInfo( ?) ;
PROMPT STR(I) PIXEL SIZE 50,50 ;
MESSAGE "Abbruch"
aBtn[I]:lDrag := .t.
next
Thanks in advance
Otto
Code: Select all
FOR I:=1 to 6
@ 200,100 BUTTONBMP aBtn[I] OF oGrund ACTION MsgInfo( ?) ;
PROMPT STR(I) PIXEL SIZE 50,50 ;
MESSAGE "Abbruch"
aBtn[I]:lDrag := .t.
next
Try: aBtn[ nBtn ]:cTitle()Otto wrote:How do can I insert a number of buttons to a WINDOW with a variable name.
Code: Select all
FOR I:=1 to 6
@ 200,100 BUTTONBMP aBtn[I] OF oGrund ;
PROMPT STR(I) PIXEL SIZE 50,50 ;
MESSAGE "Abbruch"
aBtn[I]:bAction := MyActionBlock( aBtn, i )
aBtn[I]:lDrag := .t.
next
static function MyActionBlock( aBtn, i )
return { || MsgInfo( aBtn[i]:<anydata> )}
Code: Select all
FOR I:=1 to 6
@ 200,100 BUTTONBMP aBtn[I] OF oGrund ;
PROMPT STR(I) PIXEL SIZE 50,50 ;
MESSAGE "Abbruch"
aBtn[I]:OnClick := { |o| MsgInfo( o:cCaption ) }
aBtn[I]:lDrag := .t.
next