Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How column When() gets control in a Grid object
Message
From
17/05/2008 02:20:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
14/05/2008 15:54:57
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01317146
Message ID:
01317812
Views:
11
>I always though the When() will get control when you click on the object or object get control.
>
>Does the grid has a different behavior?
>For example, the first time I click in a grid, let say column 3. the when() of column 2 get fired.
>is that weird behavior? or it is by design? or it is me?

After reading the rest of the thread, I think the easier way out of this would be to bindevent() your textbox's .gotfocus() to a custom method of a grid or some of its parent objects - or of any other object. You can, maybe, do the binding itself from grid's .init() - by that time the grid's controls have instantiated, but if the object you're binding to is a parent object to the grid, or a sibling, or a member of a parent.parent (and so on), it may not be instantiated yet; you may have to wait until the .activate() of the parent. If it's a custom grid and you have the vcx, just add a new method to it, and bindevent() to that method.

There you can use aevents() to get a reference to the object whose .gotfocus() has fired, so from that point on you can do in this method whatever you wanted to do in the .when().

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform