/* * MiniGUI This Demo * 29.5.2003 Gerardo Fernandez * * 'this' can be useful when you want to share the same code for different controls */ #include "minigui.ch" Function Main DEFINE WINDOW Form_1 ; AT 0,0 ; WIDTH 560 ; HEIGHT 200 ; TITLE 'This Demo' ; MAIN for i:=1 to 26 cButton:="btnLetter"+strzero(i,2) @ 20,20*i BUTTON &cButton; CAPTION chr(64+i) ; ACTION ButtonPressed() ; WIDTH 20 next END WINDOW CENTER WINDOW Form_1 ACTIVATE WINDOW Form_1 Return /* */ Procedure ButtonPressed() this.enabled:=.f. MsgInfo('You pressed '+this.caption+' and cannot press it again') Return /* */