Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to programmatically add code to method?
Message
 
 
To
06/04/2003 20:28:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00774568
Message ID:
00774577
Views:
18
This message has been marked as the solution to the initial question of the thread.
It's possible but in different way, for example
getcopy = CREATEOBJECT("FORM")
getcopy.AddObject("txtbegindate","TEXTBOX")
getcopy.AddObject("txtenddate","TEXTBOX")
getcopy.txtbegindate.value = DATE()-30
getcopy.txtenddate.value = DATE()
getcopy.addObject("cmdOK","Okbutton")
getcopy.windowtype = 1
getcopy.txtbegindate.visible = .t.
getcopy.txtenddate.visible = .t.
getcopy.txtbegindate.top = 26
getcopy.txtbegindate.left = 42
getcopy.txtenddate.top = 88
getcopy.txtenddate.left = 42

* this fails - read only
*getcopy.cmdOk.Click = "Thisform.Release"
getcopy.cmdOK.Top = 150
getcopy.cmdOK.Visible = .T.
getcopy.show()

DEFINE CLASS Okbutton AS CommandButton

PROCEDURE Click
	Thisform.Release()
ENDPROC	
ENDDEFINE

>Hi Sergey,
>
>I want to pop up a form with an OK button, without having to use the Visual Designer? Perhaps have some other code in the buttons.
>
>I thought it would be possible to create it in code and not 'clutter up' my project with forms. If it is not possible, I will simply go back to the visual designer.
>
>
>
>>>
>>>Thanks in advance!
>>
>>Andrew,
>>
>>You cannot add code to an object methods. What're trying to achive?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform