Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Dan Baker
  Where is Dan Baker?
 Effort of the Poconos
 Pennsylvania - United States
 Dan Baker
 To: Mike Yearwood
  Where is Mike Yearwood?
 Toronto
 Canada
 Mike Yearwood
 Tags
Subject: RE: Simplify column style creation in cnt
Thread ID: 416471 Message ID: 416525 # Views: 29 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Tuesday, December 30, 2014 7:15:44 PM         
   


>
> I'm really hesitant about WITH...ENDWITH. If you call a method in the with, and in that method you have a mistaken .Property, it falls back to the WITH. Very dangerous if unintentional.
>
> It's much clearer to...
>
>
> op=Evaluate('o'+Transform(m.p))
> oControl.Left = op.cmdMarginLeft
> oControl.Width = op.cmdWidth
> oControl.Top = op.cmdMarginTop + m.nTop
> oControl.Caption = Icase(p=1,junk.country,p=2,junk.Region........)
> 

>
> Mike Yearwood
> Microsoft MVP Visual FoxPro 2008, 2009
> We have enough youth. We need a fountain of smart!
> There may be many ways to skin a cat, but there are very few right ways to do it.

Hi Mike,

Are you saying that WITH... ENDWIDTH is not good in this situation, or do you
dislike it in general?

But I get what you're saying.  In fact, maybe the reason I couldn't figure out the
problem was that I got confused about what object was referring to what.  So from
the standpoint of less text, WITH... ENDWIDTH sounds great, but in terms of
more understanding, you may be indeed be right.

Cheers,

Dan B.

BTW, I'm working on your suggestion about the run-time modification of controls
and should have something to show in a few weeks.


P.S. From the sound of your tag line: "There may be many ways to skin a cat, but
there are very few right ways to do it", you and my wife might get along great.  It seems
like I can never clean the dishes the "right way." :- )  But I'm making progress in
curing my ignorance.

ENTIRE THREAD

Simplify column style creation in cnt Posted by Dan Baker @ 12/30/2014 2:47:29 AM
RE: Simplify column style creation in cnt Posted by Jun Tangunan @ 12/30/2014 4:58:43 AM
RE: Simplify column style creation in cnt Posted by Dan Baker @ 12/30/2014 12:46:00 PM
RE: Simplify column style creation in cnt Posted by Mike Yearwood @ 12/30/2014 6:51:21 PM
RE: Simplify column style creation in cnt Posted by Dan Baker @ 12/30/2014 7:15:44 PM
RE: Simplify column style creation in cnt Posted by Mike Yearwood @ 12/30/2014 9:21:00 PM
RE: Simplify column style creation in cnt Posted by Jun Tangunan @ 12/30/2014 9:51:17 PM
RE: Simplify column style creation in cnt Posted by Dan Baker @ 12/30/2014 10:59:55 PM