Click here to Skip to main content
15,921,643 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
if i click option button textbox will visible with label...how to write code for that...please post answer
Posted
Comments
Thanks7872 22-May-13 5:12am    
Put textbox with label inside panel,make panel visible whenever button clicks.There are no. of articles on the web how to use panel and its properties.
venkivenkatesan 22-May-13 5:28am    
give model coding dear....

Go to the proprities of your textBox and your label and switch the case "visible" to "false", then try this in your option button click event:
C#
private void yourOptionButton_Click(object sender, EventArgs e)
       {
           yourTextBox.Visibility = true;
           yourLabel.Visibility = true;
       }
 
Share this answer
 
v2
If you want to show some predefine values in that textbox as a label than
You can use the textbox directly to work as a label, mean uneditable textbox after clicking on button.

for example if you are getting value of some other textbox in some string like.

string str = txtbox2.text.ToString();

and want to put that value as label in other textbox than,

You may use.

C#
private void Increment_Click(object sender, EventArgs e)
       {
           string str = txtbox2.text.ToString();
           txtIncrement.text = str ;
           txtIncrement.Visibility = true;
           txtIncrement.enabled = false;
       }



Sorry if i didnt understand your logic well, but hope so that it gona help you a bit atleast..


Regards,
:)
 
Share this answer
 

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