Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active control
Message
 
 
À
29/10/1998 09:04:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00151923
Message ID:
00152246
Vues:
33
>>>>>>>>Now how do I click on a button on a toolbar and have it do something to the active control? Or maybe "last active" would be more accurate, since the toolbar button would now be the active one.
>>>>>>>>
>>>>>>>>Thanks,
>>>>>>>>
>>>>>>>>-Michelle
>>>>>>>
>>>>>>>You can add
>>>>>>>Thisform.LastActiveControl=This
>>>>>>>to each control GotFocus event, or use subclassing here.
>>>>>>>Don't forget to set This.LastActiveControl=.NULL. in Form.Destroy event
>>>>>>
>>>>>>
>>>>>>So from the toolbar I do _SCREEN.ActiveForm.LastActiveControl.FontBold = .T.?
>>>>>>
>>>>>>Or does the toolbar become the active form? I'm sorry if I'm being dense here, but what I really need is the object hierarchy path to the property of the control to put in the CLICK() of the toolbar button.
>>>>>>
>>>>>>Thanks,
>>>>>>
>>>>>>-Michelle
>>>>>
>>>>>You can call ActiveForm, because toolbar doesn't take focus. But for OO sake, try to do it in generic way, i.e. find form you really want to find and provide communication to this form.
>>>>
>>>>The form I want to find _is_ the active form so calling ActiveForm seems to be the way to find it. I think I'm missing your point.
>>>>
>>>>-Michelle
>>>
>>>Ok, use ActiveForm.
>>
>>LOL! You sound like a parent who's given up trying to explain why the child can't have another cookie. This is starting to become a moot point, anyway. I've got other people busy convincing me I shouldn't use a toolbar at all. I'm leaning towards having it all together in a class, but I've run into a resizing problem as I said in another post.
>>
>>Still, it's nice to know how to do it with a toolbar, for future reference.
>>
>>Thanks,
>>
>>-Michelle
>
>IMO, toolbar is valuable member of application, and should be used, unless specific strong wishes of your boss/clients.

< sigh > Well, two against the toolbar, one for. I don't think it matters much to my boss or my clients. I think I'll try it both ways and see which works better.

Thanks,

-Michelle
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform