I am new of OpenOffice.org 3.0 and unfortunately I don’t know the Basic language
I have found on Internet an article that illustrates like creating interactive forms with OpenOffice.org Writer that consists of a series of multiple choice questions. Here it is in detail:
I have created a Group Box containing Option Buttons with the defined answers. Then in order to make the form interactive, I have added some simple macro associated with Option Button to inform me whether the selected answer is correct or no. I have also created a Reset button that clears all the answers by means of its macro (ResetControls). Here it is the code:
Message="The answer is correct!"
Message="The answer is incorrect!"
oDoc = thisComponent
oDrawPage = oDoc.getDrawPage()
oForms = oDrawPage.getForms()
oForm = oForms.getByName("Standard")
It works very well on Writer, but when I copy the code into OpenOffice.org Impress it does not completely work… only two macro work, that is CorrectAnswer and IncorrectAnswer, but no ResetControls… Why?
I am really trying to use this system in Impress by means of OpenCards extension in order to make it an interactive tool with the multiple choice questions by means of Option Buttons: only one of possible answers is correct and it is selectable through its Option Button.
I use slide-title as flashcard front on which I write the correct answer, and the slide-content as its back on which I write both question and five possible answers with their Option Button.
During last-minute learning session OpenCards shows both question and its answers in the slide-content, and on this event it would need a macro, said ResetControls
, to reset any Option Button automatically without having to click some Reset-button (like in the Writer example), so that no answer is selected. I would not want to implement a Reset button.
At this point I select an answer and then click on the Complete Shows Card-button in the Choose Action window. During this event OpenCards shows correct answer written in the slide-title, but it changes current selected answer (in Option Button) with previous chosen answer. It would need another macro, said MaintainAnswer
, in order to continue to show the current selected answer that it is confronted with correct answer written in the slide-title. If the answer is corrected then Perfectly-button is clicked, otherwise Not at all-button is clicked, and OpenCards shows next slide. The cycle is closed and it newly begins from head with ResetControls macro that it resets any answer-Option Button, and so on…
Can someone realize these macros and share them with all community?
P.S. I have attached an example file without macro:
Thanks very much for your help!!