첫 번째 과제는 사용자가 텍스트 상자에 입력 한 문자열의 텍스트 색상, 정렬 등을 동적으로 변경할 수있는 프로그램을 만드는 것입니다. 먼저 내 굵게 밑줄 버튼 작업,하지만 이탤릭 하나 : 여기 내 문제의 둘째레이블 텍스트 색상 변경 RadioButton
label5.Font = new Font(label5.Font.Name, label5.Font.Size, label5.Font.Style^FontStyle.Italic);
, 내 텍스트 색상을 변경하는 라디오 버튼을 사용할 수 있고, 버튼 당이 버튼을 관리해야하지만, 내가 글꼴을 변경 내 라디오 버튼의 이름을 사용하는 것이 하나의 절차를함으로써 좀 더 효율적으로 만들고 싶어, 여기에 내가의 의미는 다음과 같습니다
protected void Colorchange(object sender, EventArgs e)
{
RadioButton selectedRadioButton = (RadioButton)sender;
selectedRadioButton.Name = sender.ToString();
label5.ForeColor = Color.???????; <---Can't figure how to put the name string here....
}
정적 색상 클래스는 색상 이름으로 속성을 갖습니다. 따라서 Color.Red; 예를 들면 –