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

Posted on 2007-07-30
Last Modified: 2010-04-23
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?


Question by:Todd_Anderson

    Expert Comment

    Is AutoSize on?
    If it is turn it off and adjust the Width propert of the button.

    Author Comment

    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.
    LVL 96

    Accepted Solution

    Is this font size sufficiently small enough?   Fonts like Arial have narrow characters, and might help.

    LVL 34

    Assisted Solution

    Try setting

            myButton.FlatStyle = FlatStyle.System

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


    Author Comment

    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.



    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
    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…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    729 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

    16 Experts available now in Live!

    Get 1:1 Help Now