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

Button state not being set

Thread ID:





68225 Sep 12,2007 02:45 PM UTC Sep 13,2007 01:36 AM UTC WinForms 1
Tags: Tools
Asked On September 12, 2007 02:45 PM UTC

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


Rajagopal [Syncfusion]
Replied On September 13, 2007 01:36 AM UTC

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_Click
buttonAdv2.State = ButtonAdvState.Pressed;
buttonAdv1.State = Syncfusion.Windows.Forms.ButtonAdvState.Default;

Let me know if you have any other questions.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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