Z
zhangheaaa
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure form1.cmboBoxMonthChange(Sender: TObject);
begin
{改变月份}
Calendar.Month := (Sender as TComboBox).ItemIndex + 1;
end;
请问在以上程序中,为什么不直接使用combobox控件,
即:Calendar.Month := cmboboxmonth.ItemIndex + 1;
而要使用(sender as tcombobox).itemindex
begin
{改变月份}
Calendar.Month := (Sender as TComboBox).ItemIndex + 1;
end;
请问在以上程序中,为什么不直接使用combobox控件,
即:Calendar.Month := cmboboxmonth.ItemIndex + 1;
而要使用(sender as tcombobox).itemindex