單選按鈕控件的運(yùn)用
提問(wèn)人:劉冬梅發(fā)布時(shí)間:2020-10-10
(1)創(chuàng)建如圖9-18所示的窗體
(2)設(shè)置窗體和各控件的屬性,如表9-3所示。
(3)打開(kāi)代碼窗口,編寫事件過(guò)程。
private void rdoApple_CheckedChanged(object sender, EventArgs e)
{
txtPrice.Text = "10.0";
}
private void rdoBanana_CheckedChanged(object sender, EventArgs e)
{
txtPrice.Text = "8.5";
}
private void rdoPineapple_CheckedChanged(object sender, EventArgs e)
{
txtPrice.Text = "12.5";
}
繼續(xù)查找其他問(wèn)題的答案?
相關(guān)視頻回答
點(diǎn)擊加載更多評(píng)論>>