❔ Damn buttons.

I want a button on a WinForm to change varibles to whatever the combobox has selected when the button is clicked. Is this the right format for this?

private void btn_Apply_Click(object sender, EventArgs e)
        {

            TimeSelector.HourSelector = cb_sdHour.SelectedItem.ToString();
            TimeSelector.MinuteSelector = cb_sdMinute.SelectedItem.ToString();
            TimeSelector.AmPmBuffer = cb_sdAmPm.SelectedItem.ToString();
            lbl_shutdown.Refresh();
        }

Basically change the three variables, then refresh the label showing those variables?
image.png
Was this page helpful?