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: Kulwant Singh
  Where is Kulwant Singh?
 Shimla
 India
 Kulwant Singh
 Tags
Subject: RE: Set All for Methods
Thread ID: 248825 Message ID: 248826 # Views: 1 # Ratings: 2
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Wednesday, December 23, 2009 4:34:23 PM         
   


> Dear Experts,
>
> If I have say 50 buttons on a form, I can set a uniform property for all of them at one go with the "SetAll" method.
> Is there a command with which I can Set a Uniform Code for "Events" of all these buttons with one stroke.
> For example I wish to put the same piece of code in the "Got Focus" event of all these buttons, will I need to select individual buttton and put the codes there?
>
> Can someone please guide me?
>
> Thanks!
> kulwant
> (Help Save the TIGER. Save Wildlife. Live & let Live)

Hi Kulwant -

As you said, a customProperty having a customProperty_assign() "event" would certainly work; and BindEvent() would, too.
But your description sounds to me as if a particular yourParentClass for those 50 buttons would be more straight forward, easier to maintain/debug/extend.


hth
-Stefan

ENTIRE THREAD

Set All for Methods Posted by kulwant singh @ 12/23/2009 4:25:44 PM
RE: Set All for Methods Posted by Stefan Wuebbe @ 12/23/2009 4:34:23 PM
RE: Set All for Methods Posted by kulwant singh @ 12/23/2009 5:12:55 PM
RE: Set All for Methods Posted by Cesar @ 12/23/2009 5:12:07 PM
RE: Set All for Methods Posted by kulwant singh @ 12/23/2009 5:17:02 PM
RE: Set All for Methods Posted by Stefan Wuebbe @ 12/23/2009 5:39:27 PM
RE: Set All for Methods Posted by ho me @ 12/23/2009 5:50:15 PM
RE: Set All for Methods Posted by Stefan Wuebbe @ 12/23/2009 5:51:39 PM
RE: Set All for Methods Posted by kulwant singh @ 12/23/2009 6:12:32 PM
RE: Set All for Methods Posted by Stefan Wuebbe @ 12/24/2009 8:56:02 AM