How do I control the text padding and spacing in a button?

VS 2005

I am adding a button with elipses (...) in it to a form.  VS is making me size the button much larger than I want it though just to show the three periods.  The button has to be about three times as wide as the three periods actually are.  I have set the padding to all zeros.  It dowsn't look like the margin is relevant.  Is there something else that I can do to reduce all the extra space in the button?


Who is Participating?
Bob LearnedConnect With a Mentor Commented:
Is this font size sufficiently small enough?   Fonts like Arial have narrow characters, and might help.

Is AutoSize on?
If it is turn it off and adjust the Width propert of the button.
Todd_AndersonAuthor Commented:
AutoSize is off.  I did adjust the width.  Slowly, pixel by pixel until all three periods were showing.  But when I get it wide enough to show all three periods there is a lot of space to the left and the right.  Wish I could post a screen shot.
SanclerConnect With a Mentor Commented:
Try setting

        myButton.FlatStyle = FlatStyle.System

You can do it either in design mode or in code on Form_Load

Todd_AndersonAuthor Commented:
Thanks for the help.  Here's my final solution.

Change the font to Arial
Cahnge the FlatStyle to System
Remove the bold font style

This allowed me to reduce the size from 27 pixels to 17 pixels.  I did them each separately and they are each responsible for about one third of the change.  Exactly what I wanted.  The button looked bulky before and stuck out.  Now it looks streamlined and fits with the standard Windows look.


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.