procedure TForm1.Button1Click(Sender: TObject);
begin
case RadioGroup1.ItemIndex of <--ItemIndex是什么,有什么功能??
0: Color := clRed;
1: Color := clYellow;
2: Color := clBlue;
3: Color := clLime;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
var
Str : string;
begin
Str := RadioGroup1.Items[RadioGroup1.ItemIndex];
case Length(Str) of
1: Color := clRed;
2: Color := clYellow;
3: Color := clBlue;
4: Color := clLime;
end;end;procedure TForm1.FormCreate(Sender: TObject);
begin //Items.CommaText是什么,有什么功能?
RadioGroup1.Items.CommaText := 'a, bb, ccc, dddd'; //ItemIndex又是什么???
RadioGroup1.ItemIndex := 0;
end;
begin
case RadioGroup1.ItemIndex of <--ItemIndex是什么,有什么功能??
0: Color := clRed;
1: Color := clYellow;
2: Color := clBlue;
3: Color := clLime;
end;
end;procedure TForm1.Button2Click(Sender: TObject);
var
Str : string;
begin
Str := RadioGroup1.Items[RadioGroup1.ItemIndex];
case Length(Str) of
1: Color := clRed;
2: Color := clYellow;
3: Color := clBlue;
4: Color := clLime;
end;end;procedure TForm1.FormCreate(Sender: TObject);
begin //Items.CommaText是什么,有什么功能?
RadioGroup1.Items.CommaText := 'a, bb, ccc, dddd'; //ItemIndex又是什么???
RadioGroup1.ItemIndex := 0;
end;
RadioGroup1.Items.CommaText := 'a, bb, ccc, dddd';RadioGroup1.ItemIndex := 0;让第一项选中
1楼说得挺好
你多用几次就理解了