S
steve bull
I have built what I think should be a dialog box. It contains 4 tabbed panes for generating a range of colors. Each
tabbed pane consists of a panel with all the widgets on them including the OK and Cancel buttons. These buttons have to
be on the panels themselves so that they can create the color range from the current settings on the panel and return
the result via a delegate to the main dialog form.
The problem I have is that the OK button needs to do the extra work before exiting. So, is there a way that I can force
the return result from the dialog box to DialogResult.Ok (or Cancel) before exiting. I.e. can I just exit or return from
the dialog form with these return codes?
Or, can I still set the OK and cancel buttons on all the panels with (okBtn.DialogResult = DialogResult.OK) and still do
an OnClick callback for the button?
Thanks,
Steve
tabbed pane consists of a panel with all the widgets on them including the OK and Cancel buttons. These buttons have to
be on the panels themselves so that they can create the color range from the current settings on the panel and return
the result via a delegate to the main dialog form.
The problem I have is that the OK button needs to do the extra work before exiting. So, is there a way that I can force
the return result from the dialog box to DialogResult.Ok (or Cancel) before exiting. I.e. can I just exit or return from
the dialog form with these return codes?
Or, can I still set the OK and cancel buttons on all the panels with (okBtn.DialogResult = DialogResult.OK) and still do
an OnClick callback for the button?
Thanks,
Steve