Step by Step, Example 5, Write Text Box with List, Active List


As example of a Write Text Box with List and example of a  Active List we would like to have this on the screen when using ADPlayer. To obtain the result  we do the following steps with ADWorks.

- Use the command New Source Document or open the document where you want to add the steps of the current example. This description will add the new elements to Document_Ex4.ADsrc and the modified document will be saved with the name Document_Ex5.ADsrc.

Remember: the Document_Ex4.ADsrc is the source file and the icon is represented by a "W". The Document_Ex4.ADcomp is the compiled file and the icon is represented by a "P". These documents are on the CD in the folder Sample/Try This/FolderEx4
- Choose Static Text from the menu Create Element of ADWorks.(See Result)
- Call the definition dialog of that new Static Text (Look and refer to Example 1) (See Result)
- Use Delete All from the Edition of the RTF Editor and type the text as illustrated. The illustrated text uses Referenced Text (RIVERLIST, WRITELIST etc.). The text looks like this after OK. (Note: Referenced Text were treated at exemple 4. Look at Exemple 4.)
- Use Create Elements / Active List / Plain Text. (See Result). This element will be for the rivers.
Active Lists are elements whose functionality lies between Active Elements and Static Text. Active Lists are used to enumerate text, pictures, sounds, etc. Active List Evaluation Tables are very simple. Items are enumerated in the column Possibilities. All other columns are not activated.
- Call the Evaluation Dialog of the created Active List (Click on his button Eval.) and enumerate the rivers. The Evaluation table looks like this and the created Active List looks like this after leaving the Evaluation Dialog with OK.
- Use Create Elements / Write Text List. (See Result) This element will be for the countries.
- Make the Write Text List (the countries) dependent from the Active List (Select the two elements and click on Link. See illustration. See as well analogous operation in exercise 2, Dependent Independent. The Write Text List looks like this after the linkage.
- Call the Evaluation Dialog of the Write Text List (Click on his button Eval.) and fill his Evaluation table like this.
In the Static Text we promised to give the first characters of the towns. We will do this in a tricky way:
1) Use the File / Transfer command of the Evaluation Dialog (See illustration).
2) Click OK on that What-is-to-transfer-dialog (See Illustration).
3) Select and copy the countries in the appearing Editor (See illustration).
4) Leave RTF-Editor with OK, leave Evaluation Dialog with OK.
5) Call the Definition Dialog of the Active List (Click on his button Def.).
6) Choose the Edit List tab und click his TURBO-button (See illustration)
    Note: The TURBO-button is only available if the insertion point is blinking in the list.
7) Paste the countries (copied at step 3) into the open Editor (See Result).
8) Define the beginning characters you want to show (See my proposition)
9) Leave the Editor with OK and arrive on the Edit List Tab
10) Use the D column of the Edit List Tab to define the desired order (See illustration)
11) Leave the Definition Dialog with OK.

We are now ready to create the Choose Box for the oceans.

- Use Create Elements / Choose Box.
- Link ist to the Active List (the rivers). (See illustration)(See Result)
Let’s say you want to give to the Choose Box the same color as the above Choose Box in the document.
1) Select the above Choose Box FIRST.
2) Select as well the Choose Box(s) that must have the color of the FIRST selected element.
3) Use Edit / Global Settings Transferring / Adapt colors to first selected element.
See general Illustration for that "Same Color Operation". See Result of the "Same Color Operation".
- Use the Edit List Tab of the Definition Dialog (Click the button Def.) of the of the Choose Box to define the list like this.
- Use Evaluation Dialog (Click the button Eval.) of the of the Choose Box to prepare the Evaluation Table like this.
(Add this, if you think it’s worth 1 point out of 3 points. Note: a) Columns can be moved with the D-column b) Lines can be inserted with the Edition Menu of the Dialog).
We are now ready to create the Choose Box for the question "Which of them is longest"
- Use Create Elements / Choose Box.
- Link ist to the Active List (the rivers). (See illustration)
- Use Definition Dialog (Click the button Def.) to give him a color (See Result. Note: We did choose a new color because we do not want him to work as Drop Down. See the below "Choose one". For the User it is convienient to ).
- Use the Edit List Tab of the Definition Dialog (Click the button Def.) of the of the Choose Box to define the list like this. On this illustration it is important to observe that a color and a resource (picture, sound etc.) can be attributed to each item of the list. The red color is associated to “longest” and the blue color is associated to “not long.” in our example.
- Use the Evaluation Dialog (Click the button Eval.) to fill the Evaluation table like this and set the choices on the Settings Tab like this. Some comments about the 3 illustrated settings:
    1) See what Initial Display does under ADPlayer.
    2) See what Texte and Color does under ADPlayer. The other choices of that setting are now almost evident.
    3) See what "Choose one" does under ADPlayer. The choice "none" would allow several “red”. This would work like a Check Box. The choice "Prohibit Repeating" is used with question that deal with ranking “Who is first, second, ..”
Note: 1) Choose Boxes set to "Choose one", can only have two items in the list of his Definition Dialog. 2) In the list the “one” (longest in our example) must be the first item. 3) "Choose one" can be combined with Drop Down if you prefer this kind of looking.
We reach almost the end :)
- Choose Validater from the menu Create Element of ADWorks and link the Active List to that new Validater (See Illustration).
Before we go to test the group, we remember that the Static Text has Referenced Text (RIVERLIST, WRITELIST etc.). We are going now to associate the Referenced Text to elements. (Note: Referenced Text were treated at exemple 4. Look at Exemple 4.)
- Call the Evaluation Dialog (Click Def. button) of the Static Text and fill the table that associates Referenced Text with elements like this.
The created group can be tested. (Look and refer to Exercise 1). See the groupe under ADPlayer.
See some most frequent error that may happen.
See possible alignment error.
Try different answers, some with typing errors and observe the default messages. Use the up and down arrows under the Validater to look up the trials you made. (With compiled documents the trials are stored in the activity file, *ADact). About messages, About activity file.
Save the document with the command File/ Save or File/Save as. This will save a source file.
Don’t forget what you should know about compiled files (look at the end of Example 1)

Special trial: Do the following steps if you want to modify the looking: 1) click that bar, play with that, then click this and finally click that AA OK.

On the CD you find this example 5 (without special trial) in the folder Sample/Try This/FolderEx5/
The files there are

- Document_Ex5.ADsrc  (the source file; a "W" in the icon)
- Document_Ex5.ADcomp  (the compiled file; a "P" in the icon)
Back to try this