Link to home
Start Free TrialLog in
Avatar of lindat98
lindat98

asked on

ToolStrip OverflowButton appearance is too small

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;User generated imageI 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;
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lindat98
lindat98

ASKER

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