Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have just recently installed Dotnetbar v9 on my computer and loaded it into visual studio.net with no problems. I have added a few Switch button controls on the form because I need it to perform both on and off functions. For anyone reading this it is an animated button control that slides left and right for on and off but I cannot seem to figure out the code for this object. I need to be able to set it to on when the program loads or off if user chooses.

I know this must be simple but i am not familiar with some of the new controls and there is very little in the area of examples for code with dotnetbar.

thank you very much for your time....(looking forward to an answer)
Posted
Comments
Dale 2012 24-May-11 4:05am    
for example I may want to show a picturebox if the value of the switchbutton is on or set the picturebox to invisible if the button is switched to off

You should talk to the people who created it - DevComponents[^] - they should provide technical support and will know more about their product than we will. If they don't, then find another supplier and demand your money back!
 
Share this answer
 
solution 1
if(switchButton.Value==true)
{
pictureBox.Show();
}
else if(switchButton.Value==false)
{
pictureBox.Hide();
}

solution2
if(switchButton.Value==true)
{
switchButton.SetValue(false,0)
}
 
Share this answer
 
Comments
Richard Deeming 8-Jul-15 10:58am    
This is a solved question from over four years ago!

Furthermore, your "answer" clearly shows that you didn't bother reading the question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900