We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Non-Clickable Button (Use button only as a label)

Thread ID:

Created:

Updated:

Platform:

Replies:

63708 Jul 8,2007 10:41 PM UTC Jul 9,2007 12:25 AM UTC WinForms 1
loading
Tags: Tools
Alan Read
Asked On July 8, 2007 10:41 PM UTC

Hello,

What would I need to override to make a button non-clickable? Basically I just want to use the button for its office 2007 styles.

The attached image will better clarify how I want to use the button..I just want it to be a static label.

I know I have to override the MouseHover and MouseDown events but what code would I put it so that nothing is registered etc.

Thanks

buttonaslabel.zip

Alan Read
Replied On July 9, 2007 12:25 AM UTC

I figured it out.

At first I was going to create a custom control from buttonAdv but then I figured out that if I set the following things:

SuspendMouseState();
TabStop = false
keepFocusRectangle = false;

It works out like I want it too.

Thanks

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;