Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid & Memo and other problems...
Message
From
12/06/1999 03:27:53
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00227549
Message ID:
00229119
Views:
21
> in buttons when event
> this.parent.LastActive=thisform.activecontrol
>
> right?

Right.

> in buttons click event (after all lines of code)
>
> what?
>
> I can not assign thisform.activecontrol, I beleive, so, how can I operate here?
>
> Local lcControl
> lcControl=this.parent.LastActive
>
> thisform.lcControl.SetFocus() ????????

Much easier: thisform.LastActive.SetFocus - remember, this is an object referrence, which means it has all the properties and can call all the method code of the object it refers to. Just take care you have no objects which don't have a SetFocus (like OptionGroup).

> Because I think that easier to create a property for a class than create a new property for a form (if we will use different classes for forms).
>Am I right?

Matter of choice and general availability. If you are trying to solve this for this one form, why bother to rework the NavStand class? OTOH, if you'll need this elsewhere, why do it again for each form in turn - do it at the class level. You may choose to keep it in your NavStand class, or to keep it in your form class.

Though, I think your request is highly specific - if I clicked Save after the last control, I'd expect my form to move focus regularly to the topmost control, not back to the control where I was; so I don't expect this sort of behavior to be widely desirable. Well, you know your needs better than I do - it's up to you.

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