Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5 - Toolbars & Toolbar Icon Problems
Message
De
10/11/1998 01:54:26
Bruce Gilmour
Cal-Mour Consultants
Calgary, Alberta, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00155593
Message ID:
00156055
Vues:
47
Hi again Michel;
Sorry I took so long to get back to this but I got tied up with a customer this afternoon and had guests over this evening. Sounds like you had an interesting discussion with Edward and Nancy. As long as your toolbars can be moved and docked independently of the forms they are controlling, great.

I created one forms control toolbar class and use it for all my forms. If I require a specialized bar for one form then I create a class for the special controls and go from there. I did not create button classses that I can reuse because so far I have only needed the one bar. I have used the same class in more than one application. Basically it contains navigation buttons, new, revert, delete and save buttons and a print button and exit button. I instantiate it once and then track how many forms are using it. Each button refers to the current form as _screen.activeform and calls the appropriate code from the form itself as, for example, _screen.ActiveForm.Next() does the routine to call the next record. The Next method is part of the base from class I created and can be customized, if neccessary, for each form.

I am planning on creating a form toolbar that would have all the forms on it that are available from the menu. It is also possible to have a toolbar customized with the forms a user uses most often. Again this is only one class using a sub classed button and a table of forms information combined with a table of user preferences. I got the idea from some of the discussions here.

The only thing I still can't grasp, as you may have gathered, is why you need so many tool bars. What customization are you doing?

>OK,
>
>Here is what I did :
>
>1) Create my toolbar class using CREATE \ CLASS \ TOOLBAR.
>
>2) Saved MYTOOLBAR class.
>
>3) Created a toolbar based on MYTOOLBAR class. The problem with
> that is that to be able to visually create the toolbar based on
> MYTOOLBAR class, I need to have a form open, and the form designer
> then tells you that you need to have a formset if you want to add the
> toolbar.
>
> To get around that I temporarily make my default FORM CLASS in
> TOOLS \ OPTIONS \ FORMS, the MYTOOLBAR class, and then click on
> NEW \ FORM and that gives me a toolbar ON ITS OWN that I can edit
> to my heart's content without needing to have it as part of a
> formset.
>
>4) The problem arises when I use the toolbar in code. Even after releasing it
> through all the available methods, including CLEAR ALL, etc...,
> when I try to MODIFY FORM on it to go and add code to it, say,
> I get FILE IN USE error.
>
>Now, it could be that I am doing it the wrong way as regards being able to
>visually create a toolbar and design it, without having it as part
>of a formset. If so, then I would love to know the way I should really do it.
>
>Regards,
>Michel.
>================== Your original message follows ===================
>
>>>Bruce,
>>>
>>>I can do that too. However, I have a different requirement. See below the response I gave someone else. I would be interested if when you try to do
>>>the same, you too get the same FILE IN USE error.
>>>
>>>Michel.
>>>
>>Michel, I would be interested in what you are trying to chnage that you need to have it in a form. But I think the .NULL. principle applies anyway. In your Destroy or app exit set the form.name to .NULL. and see what happens.
***************************
Bruce Gilmour

"Two things are infinite, the Universe and human stupidity. And I am not sure about the Universe."
- Albert Einstein
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform