Solved

ToolStrip OverflowButton appearance is too small

Posted on 2014-12-03
2
369 Views
Last Modified: 2014-12-08
I have become the developer for an existing application with a System.Windows.Form.SplitContainer. On the left side of the container is a TreeView control that, based on selection, determines what is seen in the right side of the container.  The right side is setup with a Tool Strip pinned to the upper left corner and area for displaying various configurations of the selected left side node.  The ToolStrip contains 1 -> n buttons (based on how many configurations there are). The CanOverflow property is True.  The OverflowButton is correctly not displayed when not needed and is displayed correctly when the user either resizes the window of the application or when there are too many buttons to be displayed across the toolstrip.  However, the OverflowButton and arrow are too small for the user to notice that there are more items (see image).  
I set the following properties of the OverflowButton in hopes that the button would be wider and have the image on the button but it seems nothing I do works.  How can I change the appearance of the OverflowButton item.
 

this.toolStrip1.OverflowButton.AutoSize = false;
this.toolStrip1.OverflowButton.Size = new Size(50, 25);
this.toolStrip1.OverflowButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStrip1.OverflowButton.Image = global::MyApp.Properties.Resources.NavButtonRight;ToolStrip Overflow ButtonI have become the developer for an existing application with a System.Windows.Form.SplitContainer. On the left side of the container is a TreeView control that, based on selection, determines what is seen in the right side of the container.  The right side is setup with a Tool Strip pinned to the upper left corner and area for displaying various configurations of the selected left side node.  The ToolStrip contains 1 -> n buttons (based on how many configurations there are). The CanOverflow property is True.  The OverflowButton is correctly not displayed when not needed and is displayed correctly when the user either resizes the window of the application or when there are too many buttons to be displayed across the toolstrip.  However, the OverflowButton and arrow are too small for the user to notice that there are more items (see image).  
I set the following properties of the OverflowButton in hopes that the button would be wider and have the image on the button but it seems nothing I do works.  How can I change the appearance of the OverflowButton item.
 

this.toolStrip1.OverflowButton.AutoSize = false;
this.toolStrip1.OverflowButton.Size = new Size(50, 25);
this.toolStrip1.OverflowButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
this.toolStrip1.OverflowButton.Image = global::MyApp.Properties.Resources.NavButtonRight;
0
Comment
Question by:lindat98
2 Comments
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 40481452
Take a look at this Code Project article.  The sample code shows a custom ToolStripRenderer, and has bitmaps for the overflow button.

ToolStrip Custom Renderers
http://www.codeproject.com/Articles/12785/ToolStrip-Custom-Renderers
0
 

Author Closing Comment

by:lindat98
ID: 40487528
Thank you.  The article and code very informative.  I had steered away from a custom renderer but I feel more confident seeing the examples.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Capture logon name 13 70
What is "public object" in C#? 3 45
help with regular expression to search string 6 23
Getting error in connectionstring with Excel. 30 30
This article will show, step by step, how to integrate R code into a R Sweave document
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
The viewer will learn how to implement Singleton Design Pattern in Java.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now