Sandbar, ToolStrips and design time....

My current application used Sandbar for menuing and toolbars because it was originally constructed in .NET v1.1 and Sandbar gave us some great functionality that the basic menus/toolbars in .Net v1.1 did not.....

For the most part with our conversion to .Net v2.0 we have the attitude of "if it works, don't update". Basically there are many areas of the application that did not need any change when we migrated to .Net 2.0 several months ago. Toolbars, specifically Sandbar, was one of these, until now. Recently we have had a few requirements that, while possible in Sandbar, they were just easier in the default toolbars. There is also a growing group of developers/managers that feel Sandbar is not performant enough, and don't like Sandbar.... (please note, I'm not making a judgment here, this not a Sandbar vs Toolstrips flameup, I'm just describing some of the reasons why we're converting to Toolstrips....)

So, I've been converting some of our Sandbar Toolbars and Menubars to Toolstrips and MenuStrips. The conversion is easy enough, the two are quite similar, but what I'm struck with is the lack of designer support for either one.... (Finally we get to the point....)

In both Sandbar and Toolstrips/Menustrips you can drag/drop and GUI design if you're creating your toolbar/menubar in the form where it will live. We, however, approach toolbars and menubars more like user controls. They are independent controls that then are added to any number of forms, as such we want to inherit from a "Toolbar" (or "ToolStrip") class and then add our buttons and labels and widgets.... Think of all the toolbars in Office products, do you really want to code up the "Format" toolbar 10 times for 10 applications? Hell no, you make a generic "Format" toolbar and use it in any application that needs formatting abilities....

While we can code these toolbars, you have to do it all in code, no design GUI tools. It's a real PITA.... Sure I can design a toolbar in a fake form, and then cut/paste the code into another class file, but that doesn’t always fit, and why should I have to do that step? Why can't create a toolbar/menu in a designer separate from a form?

-Andy

Print | posted on Thursday, August 03, 2006 7:31 AM

Comments on this post

No comments posted yet.

Your comment:

 (will show your gravatar)