Results 1 to 8 of 8

Thread: [RESOLVED] Button border -- no thanks

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2007
    Posts
    751

    Resolved [RESOLVED] Button border -- no thanks

    Is there any way (didn't see one) of removing the default black border on a button?

    I want the entire button to be the same color.

    Thanks.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Button border -- no thanks

    Yeah, use a label or a panel instead of a button. Then you get no border. Both of those controls respond to click events, so there is no functional difference between them and buttons as long as you are just using events handled by both.
    My usual boring signature: Nothing

  3. #3
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Button border -- no thanks

    And if you're using a label or a panel to replace a button, don't forget to provide some way to let the user know it's clickable. This can be done by handling the enter and leave event of the control and change its appearance or the mouse cursor.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  4. #4
    Member
    Join Date
    May 2008
    Posts
    35

    Re: Button border -- no thanks

    You could also change the FlatStyle property of the button. Then you can edit the border colour.

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2007
    Posts
    751

    Re: Button border -- no thanks

    Ok -- didn't see that pull down menu for flat appearance.

    thanks.

    more to come.

  6. #6
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: Button border -- no thanks

    Quote Originally Posted by Typhoon808
    You could also change the FlatStyle property of the button. Then you can edit the border colour.
    Good solution... I should have thought of this, but I didn't.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2007
    Posts
    751

    Re: [RESOLVED] Button border -- no thanks

    Only drawback is that you can't edit it in code from what I can see...

    You can do a button1.backcolor

    but can't do a...

    button1.bordercolor ?

    no big deal though.

  8. #8
    Frenzied Member MrGTI's Avatar
    Join Date
    Oct 2000
    Location
    Ontario, Canada
    Posts
    1,277

    Thumbs up Re: [RESOLVED] Button border -- no thanks

    Yeah, it's there. Only hidden.

    Code:
            With Button5
                .FlatStyle = FlatStyle.Flat
                .FlatAppearance.BorderColor = Color.Brown
                .ForeColor = Color.CornflowerBlue
                .BackColor = Color.DarkGray
            End With
    ~Peter


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width