Hi
I am relatively new to programming, but have spent time looking at the basics.
Right now I am adding a feature to an open-sourced program, and need help in passing on a checkbox name.
What I have tried is to extract the name from the object and pass on the string, however I am having trouble getting the string accepted as code:
I'm guessing that there is an easier way, like passing on the object.Code:private void tick_Up_CheckedChanged(object sender, EventArgs e) { string senderStr = (sender as CheckBox).Text; if (tick_Up.Checked) { PresAction(combo_Up.Text, senderStr); } else { PresActionUp(combo_Up.Text, senderStr); } }
Help please
Thanks in advance
You should be able to access the text of the checkbox directly through either it's name or text field (Can't remember which exactly).
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks