Tools/adcontrols

From ChyTV Knowledge Base

Question: Can ChyTV display alternate time and date formats? Can the colors be changed?

Answer: Yes, there are a variety of 'expert' features to help format AD field displays.


ChyTV Active Data Commands

Release Date: 2/18/2008

Version: 4.09

Version ChyTV.net: 4.14


Description: 3 new control items have been added to Active Data Operation:

1. MonoSpace Font Spacing

2. Tab Columns within an Active Data Control

3. Stop on Empty to Active Data Range Updates.


Application:

1. MonoSpace Font Spacing: This is intended to be used when column data is desired and the columns should neatly align.

2. Tab Columns within an Active Data Control: This is intended to be used for column based information. This provides a more efficient data to display mechanism.

3. Stop on Empty to Active Data Range Updates: When sport scores are being displayed in an Active data Range loop if the number of games is less than the number of slots allocated then the the loop will display many blank pages for those slots lef unfilled. This will skip blank active data slots and not display then thus endING the loop at the last active data slot with visible text.



Active Data Control Values

Added to the list of Active Data Control values are the following:


{MS} MonoSpace text based on entire Font. This will derive the mono spaced width from all the characters with the font.


{NM} Monospace text based on numerical digits within Font. This will derive the spacing from the widths of only the numeric characters within the font.


{RT X1,X2,X3,X4,X5,X6,X7,X8} Set row tab locations. There are 8 Tab Stops available per Active data Field yielding 9 columns. Each Tab Stop is defined as a percentage of that Active Data field to skip to. Text always start at the beginning of the Active Data Field so this accounts for the seventh column.

For example:

{RT 50,60,80}

This will define 3 Tab Stops. The first begins at 50% of the width of then Active data Field, the second is 60% and the third is 80%.

Also a Numeric Monospace Attribute can be assigned to the Tab Stop. For example the letter 'N' can be added after the number to set this:

{RT 50,60N,80}

This will cause the third column, 60N, to be set at 60% of the width and the text will be monospaced based upon the width of the digits within the font.


Color can be assigned to each column.

For Example: {RT 50N[rrggbb,rrggbb],70C[rrggbb],80CN[rrggbb],90RN[rrggbb,rrggbb]} {RT 50N[00FF00,FFFFFF],70C[FF000FF],80CN[FFFF00],90RN[7F0000,3f3f3f]}

Directly following the Percent Location or the Numeric Monospace Attribute a 6 Hex number can be used within brackets [], to define the RGB value for the body and the edge of the text to be displayed in that column. If no edge value is provided the default is black.

In the example the tab column starting at 50% will take on the color bright green and its edge will be white.



{SE} Stop on Empty value. When this is added to the Active Data Control that has an Active Data Range specified then any Active Data Fields within that range that are empty, A NULL character (0x00) as the first letter in that string, will be skipped in the Active Data Range Display sequence. Thus is an Active data Range is specified from 1-10 and valid text data exists in 1-7, then 8-10 will be skipped and if a loop is specified then after displaying 7 the next display will be 1.


{EB} Exit Page On Blank. When the Active Data Slot assigned to this active data field is blank this flag will cause this page not to be displayed at all and the next page in the playlist will be read in. If the Active Data is specified as an Active Data Range only the first slot in the range will be tested for content to decide if this page should be displayed.


{PB} Use the Page Break character (underscore _) exclusively for defining a page delimiter in a Text File used an Active data Field.



Active Data Values

Tab controls can be inserted within the Active data text string to position the text at the appropriate tab column set up within the Active Data Control on the page.

There are 2 methods that can be used:

1. A TAB Ascii byte (0x09) can be inserted within the string which will cause the following text to be displayed at the next tab spot.

2. A TAB control string of %TB% can be inserted within the text which will have the same effect.

For example:

Hello%TB%This%TB%is%TB%in%TB%a%TB%column.

would yield:

Hello This is in a column.



Dynamic Color can be appllied to a column. Within the text a color definition can be specified which will change the color of the text within that column.

%CO%[rrggbb,rrggbb]

The rrggbb represents the 6 hex digit value for the color (00-FF) for each of the red, green and blue components.

The first rrggbb is for the body of the text and the second is for the edge.

If the edge value is left out, like %CO%[rrggbb], then the edge will be set to black.

There is a maximum of 7 color changes per row of text. The default color for the Active Data Field plus 7 additional colors can be defined. Any more than 7 will result in the default color being used.

When the Color is changed within a tab column the default color for that column is changed and all text subsequently drawn in that column will take on the last color assigned.

The color can be reassigned at any time in the display process.

If the %CO%[rrggbb] is provided before the first column is entered with the %TB% control then the color will be assigned as the default color for the Active Data Field.



New Line Within the text a new line can be specified which will cause the following text to be displayed on the next line in the display.

%NL%



Numeric Alignment Within the text for a column the Numeric Alignment Attribute can be set. Numeric alignment will set the width of all the digits and the space character to the same value making it easier to align numbers properly within a column. Thus to align a 109 with an 89 simply enter the text, space - 8 - 9.

%NM%



Page Break To complete the display of a block of text within a text file a Page Break should be used. A Page Break can be the Page Break Character (underscore _) or the page break literal. %PB%