I need help with subscribing multiple checkbox to same function. However it says functionName not found when I try.
The type or namespace name "GroupCheckBoxClick' could not be found
void GroupCheckBoxClick(object sender, EventArgs e) { } // private void setGroupChkBox(bool loadedFromDataRow) { List<CheckBox> ApplyRewardCalcList = new List<CheckBox> { ckBxARC1, ckBxARC2, ckBxARC3, ckBxARC4, ckBxARC5, ckBxARC6, ckBxARC7, ckBxARC8, ckBxARC9, ckBxARC10}; List<CheckBox> FixedGroupPromoList = new List<CheckBox> { ckBxFGP1, ckBxFGP2, ckBxFGP3, ckBxFGP4, ckBxFGP5, ckBxFGP6, ckBxFGP7, ckBxFGP8, ckBxFGP9, ckBxFGP10}; for (int r = 0; r < 10; r++) { //says GroupCheckBoxClick type or namespace not found ApplyRewardCalcList[r].MouseDown += new GroupCheckBoxClick; }
https://stackoverflow.com/questions/67394674/winform-add-same-event-handler-to-multiple-checkbox-not-found May 05, 2021 at 11:06AM
没有评论:
发表评论