Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Code behind button built on the fly
I have a simple form I am building "on the fly". When the user presses a button on another form, this form is built and displayed. I have an edit box and a button on the form. I just can't seem to figure out how to put the code behind the button to close the form. Here is the code I am using to build the form (located in the Click event of the button the user presses to display the form):
frmErrorText = CREATEOBJECT('frmbase')
WITH frmErrorText
.AUTOCENTER = .T.
.closable = .T.
.controlbox = .T.
.height = 350
.width = 450
.ADDOBJECT('edtErrText', 'editbase')
.ADDOBJECT('cmdClose', 'cmd')
WITH .edtErrText
.LEFT = 5
.TOP = 5
.WIDTH = 300
.HEIGHT = 300
.VALUE = FILETOSTR('errors.txt')
.VISIBLE = .T.
ENDWITH
.cmdClose.CAPTION = 'Close'
.cmdClose.LEFT = 325
.cmdClose.TOP = 325
.cmdClose.HEIGHT = 25
.cmdClose.VISIBLE = .T.
.SHOW
ENDWITH
Any ideas would be greatly appreciated.
Thanks!
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement