|
-
Jun 21st, 2007, 08:21 AM
#1
Thread Starter
Hyperactive Member
DropDownToolbarButton Questions
My objective is to create a drop down list of images on a toolbar. Instead of using the drop downs as buttons firing different events I'd rather use it as more of a combobox where there is only one event fired and the selected image is then displayed at the top.
1) Is The DropDownButton the way to go with this?
2) It would seem that the combobox would be a better choice for this but I didn't see any properties to display image dropdown items instead of simply text. Am I missing something basic here?
3) Also, the drop down I created has a very large area to the right of each button choice that is completey blank - it's as if it wants text even though it's style is image only. Changing size.x eliminates the area where the control wants more input but leaves a blank area. I just need a very narrow icon-wide drop down of four different pictures with no text anywhere.
4) Finally, the reason I need help has a great deal to do with the differences between VB.Net 2003 and 2005. Could someone tell me what has changed so when I look for help online I might know what version a site might be in reference to?
I need help more with the basic function of this control than coding help. I feel like I'm using a hammer to do a screwdrivers job.
Thanks in advance.
Intermediate Level Programmer Extraordinaire 
-
Jun 21st, 2007, 09:04 AM
#2
Re: DropDownToolbarButton Questions
The ToolStripDropDownButton is intended to be used where there are several related options but one main or default option. For instance, I had an app that had a New function for several different types of objects. If you clicked the New button it would create whatever was displayed on the button. If you clciked the drop-down it would display the list of options. When you selected one it would create a new object of that type and also put that option onto the button so it was the default for next time.
The whole ToolStrip, MenuStrip, StatusStrip, ContextMenuStrip thing is new in .NET 2.0 to replace the old ToolBar, ManinMenu, StatusBar, ContextMenu classes. The new classes do the same job but in a different way. They are much more powerful and flexible.
-
Jun 21st, 2007, 09:29 AM
#3
Thread Starter
Hyperactive Member
Re: DropDownToolbarButton Questions
Thanks for clearing that up - I do not need the functionality that you're describing, I need something much more simple.
My next question is what is the best toolbar control for the job for me? I just want a drop down combobox with 4 images as choices and no text. Can the DropDownToolbarComboBox be used to hold just images?
Intermediate Level Programmer Extraordinaire 
-
Jun 21st, 2007, 07:13 PM
#4
Re: DropDownToolbarButton Questions
The reason that they overhauled the whole menu/toolbar system is that the old components were too inflexible. The new classes are extremely extensible so you can get them to do almost anything you want.
The ToolStripComboBox component is a host for a regular ComboBox control. As such it can do anything a regular ComboBox can. A regular ComboBox can't show images by default, but you can inherit it and add that functionality. I would suggest inheriting the ComboBox and adding the functionality you want, then inheriting the ToolStripControlHost class to provide a hosting component for your new class. Then your two classes will share the same relationship as the existing ToolStripComboBox component and ComboBox control.
Having said all that, I would think (without having tested) that you could still use a ToolStripDropDownButton to do what you want, although it would not be a totally intuitive interface. Buttons are supposed to make something happen and if yours doesn't it will be counter-intuitive.
-
Jun 22nd, 2007, 07:31 AM
#5
Thread Starter
Hyperactive Member
Re: DropDownToolbarButton Questions
I get it now. Thanks for your terrific explanation.
This isn't incredibly important but I do have one more question: why can't I seem to get the size of the drop down as small as an icon? The size property isn't adjustable in the properties window except by changing the font size - which is strange considering I have chosen Image Only as style.
I changed the drop down to Image and Text and added a description of the icon, which actually looks great, but I'm still curious as what's going on.
Intermediate Level Programmer Extraordinaire 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|