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

Back to Reference

TQSWINDOW Element

Contains specifications regarding the appearance of the TQS application window.

Syntax
<TQSWINDOW
  WIDTH="width"
  HEIGHT="height"
  FONT="font"
  BGIMG="bgimg"
  BGCOLOR="bgcolor"
  BGGRADIENTCOLOR="bggradientcolor"
  BGGRADIENTSTYLE="bggradientstyle"
  TEXTCOLOR="textcolor"
  SELCOLOR="selcolor"
  BGCOLOR3D="bgcolor3d"
  BORDERCOLOR3D="bordercolor3d"
  TEXTCOLOR3D="textcolor3d"
  SBUSE3DCOLORS="sbuse3dcolors"
  BGSTYLE="bgstyle"
  BGIMGREPEAT="bgimgrepeat"
  BGIMGPOS="bgimgpos"
  ADJUSTDPI="adjustdpi"
  SIZEINCLNC="sizeinclnc"
  RESIZABLE="resizable"
/>
Attributes
WIDTH
The width of the TQS window, in pixels. This attribute is only used by the main TQSWINDOW element; it is ignored for child locations.
HEIGHT
The height of the TQS window, in pixels. This attribute is only used by the main TQSWINDOW element; it is ignored for child locations.
FONT
The name of the font used throughout the application window. Additional fonts, separated by commas, can be specified to be used if the previous is not installed on the system. Defaults to "Verdana, Arial, sans-serif".
BGIMG
The filename of an image to be displayed in the background. Defaults to no image.
BGCOLOR
The background color of the application window. Defaults to "#000033".
BGGRADIENTCOLOR
TQS 2.7 The color to use with the BGCOLOR to make a gradient.
BGGRADIENTSTYLE
TQS 2.7 Specifies the type of gradient to display. Currently, it must be one of the following values:
"HORIZ"
The gradient is displayed horizontally from left to right.
"VERT"
The gradient is displayed vertically from top to bottom.
TEXTCOLOR
The color used to display text. Defaults to "white".
SELCOLOR
The color used to display selected items. When the mouse hovers over a menu item, a question answer, or a letter in the hangman letter table, this color is used. Defaults to "yellow".
BGCOLOR3D
TQS 2.1 The color of 3D objects, such as buttons. Defaults to current Windows color settings.
BORDERCOLOR3D
TQS 2.1 The highlight color of 3D objects, such as buttons. To make it look 3D, use a color a few shades lighter than the BGCOLOR3D color. Windows will automatically choose a darker shade for the button shadow. Defaults to current Windows color settings.
TEXTCOLOR3D
TQS 2.1 The color of text drawn on 3D objects, such as buttons. Defaults to current Windows color settings.
SBUSE3DCOLORS
TQS 2.1 When set to "1", specifies that if the content of the TQS window needs to be scrolled, the scroll bar color will be that specified by the various xxCOLOR3D attributes. Defaults to "0", meaning they will use current Windows color settings despite any xxCOLOR3D attributes. Colored scroll bars require Internet Explorer 5.5 or newer.
BGSTYLE
TQS 2.1 Controls how the background image is displayed. It can be set to one of the following values:
"SCROLL"
The background image will move with the window contents if the TQS window is scrolled. This is the default if no value is specified.
"FIXED"
The background image will not move if the TQS window is scrolled.
"STRETCH"
TQS 2.7 The background image is stretched to cover the entire dimensions of the window. In this case, the image will not repeat, and the BGIMGREPEAT and BGIMGPOS attributes are ignored.
"HIDEIMG"
TQS 2.7 Only applies when the TQSWINDOW element is located inside of a LOC or REPORT element. This causes the background image that would be displayed (i.e. one specified in the main TQSWINDOW element or in a parent location's TQSWINDOW element) to be hidden for this location.
BGIMGREPEAT
TQS 2.7 Specifies whether the background image should be repeated (tiled) if it is smaller than the size of the window, and in which directions. This attribute can be set to one of the following values:
"BOTH"
The image is repeated both horizontally and vertically. This is the default value if this attribute is not specified.
"HORIZ"
The image is only repeated horizontally.
"VERT"
The image is only repeated vertically.
"NONE"
The image is displayed but not repeated in either direction.
BGIMGPOS
TQS 2.7 Specifies the initial position of the background image within the window. If the image is to be repeated, its initial position is specified by this attribute, and the repetition is based on this position. This attribute must be set to one of the following values:
"1"
Bottom left.
"2"
Bottom, centered horizontally.
"3"
Bottom right.
"4"
Centered vertically, left.
"5"
Centered vertically and horizontally.
"6"
Centered vertically, right.
"7"
Top left. This is the default if no value is specified.
"8"
Top, centered horizontally.
"9"
Top right.
ADJUSTDPI
TQS 2.8 Specifies whether to adjust the WIDTH and HEIGHT automatically based on the user's screen resolution (DPI). This attribute is only used by the main TQSWINDOW element; it is ignored for child locations. By default for applications marked as version 2.8 or newer, the dimensions are adjusted; set this attribute to "0" to disable the adjustment. Applications marked for previous versions are never adjusted.
SIZEINCLNC
TQS 2.8 Specifies whether the specified WIDTH and HEIGHT values include the size of the window's nonclient area (title bar and borders). Defaults to "1" to include the nonclient area; set to "0" to specify that the dimensions refer only to the main client area of the window. In TQS 2.7 and prior versions, the default includes the nonclient version when Internet Explorer 6 or prior is installed; with Internet Explorer 7 the default refers to just the client version.
RESIZABLE
TQS 2.8 Specifies whether the window can be resized. The default value is "1", allowing the window to be resized. Set this attribute to "0" to prevent the window from being resized.
Placement

The main TQSWINDOW element must be a child of the TQS element.

TQS 2.7 TQSWINDOW elements can also be children of LOC elements, in order to override global styles with location-specific styles. In addition, it can be a child of the REPORT element, in order to customize the report screen.

Children

No children are supported within the TQSWINDOW element.

Remarks

Use of the TQSWINDOW element is optional. Additionally, each attribute is optional.

When setting the width and height of the window, the size of the title bar and window border are included. There is currently no way to specify the specific size of the client area. If the window contents do not fit in the window size, scroll bars are displayed.

Color values can either be words ("white", "blue") or hexadecimal values ("#FFFFFF", "#0000FF"). View the list of Internet Explorer's named colors.

If you specify an image file in the BGIMG attribute, it must reside in the data root folder. This is, by default, the folder containing the .TQS file.

  • TQS 2.1 The data root folder can be set with the TQS element's DATAROOT attribute. To specify an absolute path, such as an Internet address, precede the path with NOROOT?.
  • TQS 2.6 To specify an embedded file, precede the path with EMBED?.

To display gradients, the BGCOLOR, BGCOLORGRADIENT, and BGGRADIENTSTYLE attributes must each be set.

If the background image contains any transparency, the background color (or gradient) will be visible through the transparent areas.

In a nested location hierarchy, TQS will walk the hierarchy, looking at the TQSWINDOW elements attached to each LOC element, in order to put together the composite visual appearance of the location. Read the TQS Tutorial, Part XVI for a more detailed explanation.

Examples

<TQSWINDOW
  WIDTH="720"
  HEIGHT="520"
  BGIMG="bgimg.gif"
  BGSTYLE="FIXED"
  FONT="Times New Roman"
/>
<TQSWINDOW
  BGCOLOR="#FFFFFF"
  WIDTH="600"
  HEIGHT="460"
  FONT="Impact, Arial"
  TEXTCOLOR="#000000"
  SELCOLOR="#097894"
  TEXTCOLOR3D="#FFFFFF"
  BGCOLOR3D="#097894"
  BORDERCOLOR3D="#88CBDC"
  SBUSE3DCOLORS="1"
/>
<TQSWINDOW
  BGCOLOR="#000080"
  BGGRADIENTCOLOR="#0000FF"
  BGGRADIENTSTYLE="VERT"
  TEXTCOLOR="#FFFFFF"
  ...
/>
<TQSWINDOW
  BGIMG="bgimg.gif"
  BGSTYLE="STRETCH"
  ...
/>
<TQSWINDOW
  BGIMG="EMBED?samplebk.gif"
  BGIMGREPEAT="NONE"
  BGIMGPOS="1"
  ...
/>

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