Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: Bong Bungalan
  Where is Bong Bungalan?
 gensan
 Philippines
 Bong Bungalan
 Tags
Subject: RE: Adding Header.Click() event at runtime
Thread ID: 268547 Message ID: 268562 # Views: 33 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Tuesday, July 13, 2010 10:00:19 AM         
   


> Hi stefan,
>
> I am amazed how fast you can create a sample code for my concerns. Thanks a lot. It really helps (too much). by the way,
>

Actually it was a "canned" example that I had made a few weeks ago :-)


> > (As you know, just "for the records": you do not necessarily need to use Define Class syntax inside PRGs since designing "visual" classes in the visual Class Designer might be easier.)
>
> *** Pardon me for this. I never thought designing a class using visual designer is much easier. Honestyly, I find it difficult to understanding OOP though but I'm happy I can understand little inside the PRg. Thanks for the TIP.
>

You are welcome! IMO, the advantage of those Define Class samples is that they can be copied&pasted directly from the browser into a local test.PRG
And they seem quite transparent to me (which might be a matter of taste?).
You can however translate them into VCX class(es) easily:

Define Class myClass as Form
EndDefine
&& stands for -> Project Manager -> Libs -> New (class)

* Inside the Define/EndDefine block, you'll find the (non-default) PEMs ("Properties"/"Events"/"Methods"),
* that you'd edit in the Properties window:
Define Class myClass as Form
    AutoCenter = .T.
    Caption = "xy"
    myCustomProperty = 99

    Procedure Load
        && custom code lines
    EndProc
    Procedure Init
        && custom code lines
    EndProc
    Procedure myCustomMethod
        && custom code lines
    EndProc
&& where any "custom", self-defined PEMs need to be created in the Class Designer first
&& via Vfp menu -> "Class" -> "New Property/New Method"

&& The content of non-default methods would be copied&pasted without the Procedure ../EndProc lines,
&& i.e. just the custom code lines.
EndDefine





hth
-Stefan

ENTIRE THREAD

Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 8:15:49 AM
RE: Adding Header.Click() event at runtime Posted by Bhushan Sahni @ 7/13/2010 8:20:56 AM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 8:33:49 AM
RE: Adding Header.Click() event at runtime Posted by Bhushan Sahni @ 7/13/2010 8:35:09 AM
RE: Adding Header.Click() event at runtime Posted by Stefan Wuebbe @ 7/13/2010 8:37:29 AM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 9:12:34 AM
RE: Adding Header.Click() event at runtime Posted by Stefan Wuebbe @ 7/13/2010 10:00:19 AM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 2:18:31 PM
RE: Adding Header.Click() event at runtime Posted by Stefan Wuebbe @ 7/13/2010 3:29:19 PM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 3:52:15 PM
RE: Adding Header.Click() event at runtime Posted by Stefan Wuebbe @ 7/13/2010 4:17:35 PM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 4:31:10 PM
RE: Adding Header.Click() event at runtime Posted by tushar @ 7/13/2010 4:23:10 PM
RE: Adding Header.Click() event at runtime Posted by Bong Bungalan @ 7/13/2010 4:37:24 PM
RE: Adding Header.Click() event at runtime Posted by tushar @ 7/13/2010 4:43:17 PM
RE: Adding Header.Click() event at runtime Posted by tushar @ 7/13/2010 8:46:25 AM