Solved

ToolStrip OverflowButton appearance is too small

Posted on 2014-12-03
2
387 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

730 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