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.
Unfortunately, activation email could not send to your email. Please try again.

Button state not being set

Thread ID:

Created:

Updated:

Platform:

Replies:

68225 Sep 12,2007 10:45 AM Sep 12,2007 09:36 PM Windows Forms 1
loading
Tags: Tools
Shane
Asked On September 12, 2007 10:45 AM

I’m having trouble making 2 sync fusion buttons act like radio buttons. When either of the buttons is pressed they change the other button state to "Default" which makes the button look depressed. This works fine the first time but after that if the button doesn't have focus and you click it, it only receives focus but doesn't become pressed. Below are the steps to recreate it and I’ve included a sample app.

1) Click buttonAv1 - buttonAv1 changes to pressed
2) Click buttonAv2 - buttonAv2 changes to pressed and buttonAv1 changed to depressed (state = Default)
3) Click buttonAv1 - buttonAv2 changes to depressed and buttonAv1 gets focus but I would have expected buttonAv1 to become pressed


WindowsApplication1.zip

Rajagopal [Syncfusion]
Replied On September 12, 2007 09:36 PM

Hi Shane,

Thanks for your interest in Syncfusion Products.

Please try the code below to get this working properly in changing the states of the button when either of the button is clciked.

// buttonAdv1_Click
buttonAdv1.State = ButtonAdvState.Pressed;
buttonAdv2.State = Syncfusion.Windows.Forms.ButtonAdvState.Default;
buttonAdv2.Invalidate();

// buttonAdv2_Click
buttonAdv2.State = ButtonAdvState.Pressed;
buttonAdv1.State = Syncfusion.Windows.Forms.ButtonAdvState.Default;
buttonAdv1.Invalidate();

Let me know if you have any other questions.

Regards,
Rajagopal

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.

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.

;