Information générale
Catégorie:
Conception classe
Versions des environnements
Hi,
You could probably use a modified BindingNavigator. Help suggests two ways of customizing the controls in the toolbar:
A. Create the BindingNavigator with the BindingNavigator(Boolean) constructor, which accepts a Boolean addStandardItems parameter, and set this parameter to false. Then add the desired ToolStripItem objects to the Items collection.
B. If a great deal of customization is desired, or the custom design will be reused, derive a class from BindingNavigator and override the AddStandardItems method to define additional or alternate standard items.
The first option should allow you to simply get rid of the navigation buttons if they are not required. Either way you get the useful inbuilt binding to a BindingSource but as Bonnie says you'd need to do this programatically.
Regards,
Viv
>I am in the process of designing a generic 'record maintenance' toolbar containing the 'standard' add/edit/delete/save/cancel buttons. I notice that the VS toolbox already has a bindingnavigator control which already has some of the functionality that I require (although I don't require the navigation buttons).
>
>Which control should I go for? As far as I can see the bindingnavigator is just a glorified toolbar bound directly to a datasource, but I may be missing something.
>
>Can I subclass a toolbar/bindingnavigator visually or does it have to be done in code?
>
>TIA
>
>Alan
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement