1 Attachment(s)
[VB .NET] [Controls] SplitButton Control
For my program I needed a splitbutton, but I had to convert it from c# to vb .net. Original source:
http://blogs.msdn.com/b/jfoscoding/a...10/491523.aspx
http://i708.photobucket.com/albums/w...eenShot1-5.png
Usage:
After adding it to your form (like any other control), add a contextmenustrip. Set the "ContextMenuStrip" property of the added SplitButton to this contextmenustrip. Finally, add some menuitems to the toolstrip or maybe change its layout a bit.
To open the context menu, click on the arrow. To click the button, click outside this arrow (on the text). When pressing space it will click the button, any other key will activate the dropdown menu.
Re: [VB .NET] [Controls] SplitButton Control
Good control, but right clicking will still show a ContextMenuStrip...is there a way to kill that?
Re: [VB .NET] [Controls] SplitButton Control
I can't assign an image to my Split Button control. It's a shutdown menu and I want the split button image to be a shutdown image, but the image doesn't show up. What do I do?
Re: [VB .NET] [Controls] SplitButton Control
Quote:
Originally Posted by
soulblazer
I can't assign an image to my Split Button control. It's a shutdown menu and I want the split button image to be a shutdown image, but the image doesn't show up. What do I do?
The OP's last activity was back in May of 2014, so I'm not sure if he'll come back to answer your question. However, I downloaded the file and examined the code. It appears as if the style of the button is drawn manually in the OnPaint event using the ButtonRenderer.DrawButton Method. What I would suggest doing is using one of the overloads that accepts an image.
Re: [VB .NET] [Controls] SplitButton Control
Quote:
Originally Posted by
dday9
The OP's last activity was back in May of 2014, so I'm not sure if he'll come back to answer your question. However, I downloaded the file and examined the code. It appears as if the style of the button is drawn manually in the OnPaint event using the
ButtonRenderer.DrawButton Method. What I would suggest doing is using one of the overloads that accepts an image.
Thank you.
Re: [VB .NET] [Controls] SplitButton Control