Hi,
I am trying to make an app that can dynamically build up question and answer form on the fly, so that a user can select the type of question and answer (textbox, yes/no radio button, multiple choice checkboxes, etc), type in the details, then click a button and it will generate a preview of the question that they just generated below.
Now what I want to be able to do is allow the user to click on one of these dynamically generated elements, for instance, a radiobutton, and then an action will be carried out. For instance, I would like the user to be able to click on one of the "yes" radiobuttons, and then a textbox somewhere appears or disappears, that sort of thing.
I imagine this will need to be done by adding event handlers, but I'm really lost and can't find a good example. I just want to be able to go to a particular function when a mousedown event occurs, and be able to tell who the sender was.
Any help would be greatly appreciated.
I am trying to make an app that can dynamically build up question and answer form on the fly, so that a user can select the type of question and answer (textbox, yes/no radio button, multiple choice checkboxes, etc), type in the details, then click a button and it will generate a preview of the question that they just generated below.
Now what I want to be able to do is allow the user to click on one of these dynamically generated elements, for instance, a radiobutton, and then an action will be carried out. For instance, I would like the user to be able to click on one of the "yes" radiobuttons, and then a textbox somewhere appears or disappears, that sort of thing.
I imagine this will need to be done by adding event handlers, but I'm really lost and can't find a good example. I just want to be able to go to a particular function when a mousedown event occurs, and be able to tell who the sender was.
Any help would be greatly appreciated.