Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5 - Toolbars & Toolbar Icon Problems
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00155593
Message ID:
00155861
Vues:
29
I create 'New' class based on 'Toolbar', and add buttons, etc. and code behind them in Class Designer.

>Edward,
>
>How do you design the toolbar then ? You are not inferring designing
>it the long way round in code when one could do it visually, are you ?
>
>Give me another way to design a toolbar visually, with all the buttons that you
>want, interactions, method code, etc..., and I'll gladly jump at it.
>
>Michel.
>
>================= Your original message follows ====================
>
>>Michel, this is philosophical problem :). The truth is that in design time you create and edit classes, you may base these classes either on VFP base classes or subclass your own 'parent-level' classes. In run-time you instaciate objects from this classes, i.e. never create object visually. Yes, Form Designer is accomodation which allow you to combine objects of different classes together, but actual instanciatiuon will happen in run-time anyway. Toolbar is completely independent object (not incorporated into a form), so there is no any necessity to include it into Form Designer.
>>
>>>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.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform