TQS Home
Trivia Quiz Shell Version 2.8 Now Available!Bot Productions Home

Part II: Title and Author Information

TQS allows you, the author, to specify a title, which appears on the title bar, and various author information, which appears with the title in the About screen. This section of the tutorial will show you how.

So far, your TQS document should look like this:

<?xml version="1.0"?>
<TQS VERSION="2.0" EDITABLE="1">
</TQS>

The first thing we will do is specify a title for this document: My First TQS Application. To do so, we add a TITLE element inside of the TQS element:

<TITLE>My First TQS Application</TITLE>

The text of the TITLE element specifies the title of your application. It must be plain text and cannot include any HTML formatting. Your document will look like this so far:

<?xml version="1.0"?>
<TQS VERSION="2.0" EDITABLE="1">
  <TITLE>My First TQS Application</TITLE>
</TQS>

It is recommended that you indent sub-elements, such as the TITLE element above, to make your code easier to read and understand. While it makes no difference to TQS and the XML Parser, it will make your job of developing much easier.

Note: If you want to use the greater than or less than signs within the text of an element, you must use the following codes in order for the XML parser to interpret it correctly. A greater than sign is &gt; and a less than sign is &lt;. Remember that this applies not just to the title element, but to any time you want to display a greater than or less than sign.
<SAMPLETAG>3 &lt; 5 and 5 &gt; 4</SAMPLETAG>
This produces the text of 3 < 5 and 5 > 4.

Run your TQS document to see that the title now appears in the title bar. Also note that it is placed in the About screen.

Next we will specify author information that will appear under the title in the About screen. To do so, we add a AUTHORINFO element inside the TQS element, at the same level as the TITLE element.

<AUTHORINFO
  AUTHOR="Your Name Here"
  EMAIL="address@example.com"
  WEBSITE="http://www.example.com"
/>

Using any or all of these attributes is completely optional. Your e-mail address and web site address will appear as links in the TQS window, and when the user clicks on them, the appropriate e-mail or web window will open outside of TQS. Note that there is no text to this tag; it is an appropriate time to use the /> closing tag. Also, this example shows placing each of their attributes on their own line, but this is not necessary; you can place the entire tag and its attributes all in one line if you wish.

Your entire document should look like this:

<?xml version="1.0"?>
<TQS VERSION="2.0" EDITABLE="1">
  <TITLE>My First TQS Application</TITLE>
  <AUTHORINFO
    AUTHOR="Your Name Here"
    EMAIL="address@example.com"
    WEBSITE="http://www.example.com"
  />
</TQS>

Run the application and see how TQS puts your author name, e-mail address, and web site in the About screen. This concludes Part II of the tutorial; the next part will introduce you to one of TQS's location types, Hangman.

Part III: A Single-Location Application: Hangman

©2020 Bot Productions. All rights reserved.Last Updated: September 9, 2007