Button border issue in flat style

G

Guest

Hi,
I created a button with flat style appearance and with border size set to 0.

When the button is in focus it gets a border. How can I get rid of the border?

Thanks Shaul
 
G

Guest

I found some sulotions for this isuue.

like inherit the button class or implement the onPaint -



protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
if (this.Focused)
{
Rectangle focusrec = pe.ClipRectangle;
focusrec.Inflate(-4, -4);
ControlPaint.DrawFocusRectangle(pe.Graphics, focusrec, Color.Blue,
Color.Blue);
}
}




There was another solution, much more simple one -

"You can remove it by right-click to desktop -> select appearance tab ->
Effects button -> select "Hide underlined letters for keyboard navigation
Until I press the Alt key" then apply this settings of course
and voila here they are gone "



hope it will help others
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top