c#.net编码文本框和单选按钮 [英] c# .net coding for textbox and radio button

查看:103
本文介绍了c#.net编码文本框和单选按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 Hai,我正在编码  C#使用 visual studio < span class =code-digit> 2010 。 

我的应用程序中,我希望链接 a text 一种形式单选按钮 in 另一种形式。

请发送代码

我想要 text 框必须包含 radiobuttons的选定值

我的应用程序中有 3 单选按钮 in 一种形式。 这三者必须选择自动基于 textbox in 另一种形式。

示例textbox 对于学生标记单选按钮 成绩。如果 文本框标记高于 70 然后第一个单选按钮将自动选择作为 A级)。 如果标记 60 然后第二个单选按钮将自动选择 B级)。某事喜欢这...

解决方案

我想你需要通过您的表单之间的值,请访问此答案并查看链接如何执行:

以另一种形式将值传递给datagridview c #windows应用程序 [ ^ ]



祝你好运,

OI


你必须实施TextBox_TextChanged事件中的这个逻辑。在这种情况下,您必须检查值并选择单选按钮。


hi ....根据我的逻辑



首先将文本框值存储在一个列表中.....并在formload上打开另一个表单,然后在glbally访问该列表......并在该表单上使用for循环和访问列表...那个时间检查文本框的值并使用radiobutton给出正确的消息......





它会起作用

Hai, I am coding in C# using visual studio 2010.

In my application i want a link between a text box in one form and radio button in another form.

Please send the code for it.

I want text Box must hold the selected value of radiobuttons.

In my application there are 3 radio buttons in one form.And these three must select automatically based on the values of textbox in another form.

for example textbox is for students marks and radio buttons for grades.If in textbox marks are above 70 then first radio button will automatically select(as A grade).or if marks or above 60 then second radio button will automatically select(as B grade). something like this...

解决方案

I think you need to pass the values between your forms so please visit this answer and see the links how to do it:
Passing values to datagridview in another form c# windows application[^]

Good luck,
OI


You have to implement this logic in TextBox_TextChanged event. In this event, you have to check the value and make the radio button selected.


hi....according to my logic

first of all store the textbox values in one list.....and open another form on that on formload you glbally access that list ......and on that form use for loop and accesing list....that time check the vale of the textbox and give proper message by using radiobutton......


it will work


这篇关于c#.net编码文本框和单选按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆