Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Bong Bungalan
  Where is Bong Bungalan?
 gensan
 Philippines
 Bong Bungalan
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Adding Header.Click() event at runtime
Thread ID: 268547 Message ID: 268560 # Views: 35 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Tuesday, July 13, 2010 9:12:34 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,

> (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 exactly right about the different approaches: you can either replace the grid.Columns standard header at run time using doing some "For Each", "column.NewObject(...,'yourHeaderClass,...)".
> That approach is the "traditional" one and there is nothing wrong with it.
> The newer BindEvent() and .MemberClass/Library approaches were introduced in the most recent VFP versions. Both are working well too, and in your case it might be a matter of taste which one to use, in my opinion.

*** It seemed I can formulate the logic but my problem is on how to implement it. My weakness is that I cannot get the thought from a generic manual/Help files unless there is an specific example which I can see how it works. Maybe if I can fully understand the Programmers' lingo in any manuals / help files , that would be greatly helpful.

> While a disadvantage of BindEvent() is that it can be quite difficult to maintain/debug, i.e. it is not always obvious while looking at code or inside the debugger whether a BindEvent() (or property_access()/_assign() for that matter) might have caused certain behavior, so that in many scenarios classical sub-classing might be preferable,
*** Well noted your inputs.

Thanks alot.
Bong

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