好了,这就是我到目前为止所知道的。我正在尝试做的复选框,这样一次只有一个是检查。但出于某种原因,它们都会进行检查。还有一件事,我有标签在那里,但在单选按钮中,无论你检查并提交哪一个,它只显示底部的统计数据。谁能帮帮我,告诉我我哪里做错了.
Public Class Form1
Dim Message As String
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load, MaskedTextBox1.TextChanged
End S
正在学习C#、单选按钮和复选框。没有紧迫感。代码可以显示选中控件的名称,但它似乎不是一个优雅的解决方案。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace TVC
{
public partial class Form1 : Form
{
我有两个预填充单选按钮的复选框。当我在复选框上选择yes时,它会打开单选按钮,该按钮被选中为true,文本为数字。我想知道如何选择单个复选框并将其显示为总数,当我单击提交按钮时,它将我的单个复选框编号显示为标签端的总数。如果我选中并选中这两个复选框,则必须将两个复选框按钮数相加,并显示为总数。因此,如果选中单个复选框,则显示单个总计端,如果两个复选框都选中,则将两个数字相加,并在单击提交时在标签中显示总计。任何帮助都可以,非常感谢。
下面是我的代码:
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.Ev
我有以下代码,
for (i=0; i<answerArray.length; i++) {
var myOptionButton1:spark.components.RadioButton = new spark.components.RadioButton();
myOptionButton1.label = answerArray.getItemAt(i).Answer_Choice;
if (answerArray.getItemAt(i).Correct_Flag == 1) {
myOptionButto
我有3个单选按钮的摆动框架,这些buttons.The面板下面的面板必须是不同的单选按钮的每个选项。我必须改变面板,因为这些单选按钮是由用户点击的。
我试过了:
public RadioFrame() {
initComponents();
groupbuttons();
changePanel();
}
private void groupbuttons(){
//code to group these 3 buttons.
}
private void changePanel(){
if (jradioButton1.isSelected()){