The information layout of all appointments.

Version Introduced: 3.0.0

Usage

Set_Property(OLECtrlEntID, "OLE.Layout", Array)

Values

Array has the following structure:

PosNameTypeDescription
<0, 1>TypeOptionThe type of layout item
<0, 2>LocationMultivalueThe size and location of the item
<0, 3>ValueTextThe item's value; depends on type
<0, 4>SettingsMultivalueThe item's special settings; depends on type
<0, 5>FontFontThe item's font
<0, 6>Horizontal AlignmentOptionThe horizontal alignment of the item's text
<0, 7>Vertical AlignmentOptionThe vertical alignment of the item's text
<0, 8>MultilinedBooleanIndicates whether or not the item's text is displayed as multilined
<0, 9>Background EffectOptionThe item's background effect
<0, 10>Word WrapBooleanIndicates whether or not the item's text is word wrapped when multilined

Remarks

The Layout property allows you to customize how information appears on an appointment. An appointment's layout is composed of any number of layout items. Each item represents a single piece of information, which can be displayed using a number of flexible parameters.

To establish a layout, pass an @FM delimited array of layout items. Each item is an @VM delimited list of parameters. These parameters define the layout's information and appearance. Each parameter is discussed below.

Type

This is the most important parameter. The layout type indicates the kind of information to be presented. See the Available Layout Types section below for a list of types and their details.

Location

This is the location of the layout item on the appointment. The location is composed of 4 values separated by @SVM: Left, Top, Right, and Bottom. The location is a rectangle, but unlike the OI SIZE property, you specify Right and Bottom instead of Width and Height. The Location parameter is also unique in that you may specify relative locations using negative numbers. For instance, setting the Right value to -1 indicates that the right side of the layout item should be 1 pixel from the right of the appointment. Thus, when the appointment resized, the layout item resizes. You may specify negative numbers for any of the four values. Setting Left or Top to negative values is equivalent to the Anchor option in the OI Form Designer. Setting Right or Bottom to negative values is equivalent to the AutoWidth/AutoHeight options in the Form designer.

Value

This is a generic parameter. It is interpreted differently by each type of layout item. See the Available Layout Types section below for details.

Settings

This is a generic parameter. It is intrepeted differently by each type of layout item. See the Available Layout Types section below for details.

Font

This is the layout item's font. This parameter is a standard @SVM delimited font structure. Use it to customize the size, typeface, etc. The default font is Tahoma, 8 pt.

Horizontal Alignment

This is the layout item's horizontal alignment of text. This parameter can be set to "Left", "Center", or "Right". The text will be aligned accordingly within the item's rectangle as specified in Location.

Vertical Alignment

This is the layout item's vertical alignment of text. This parameter can be set to "Top", "Center", or "Bottom". The text will be aligned accordingly within the item's rectangle as specified in Location.

Multilined

This parameter indicates how text is to be treated when it is too wide to fit within the item's rectangle. Set this to 1 if you want the text to be multilined. Set it to 0 if you want the text to always be singlelined. In either case, ellipses will appear if there is more text than can fit in the entire rectangle.

Background Effect

This property is useful for emphasizing an item. There are two choices, "Sunken" and "Raised". The Sunken effect will darken the backgound and add a thin 3D sunken edge. The Raised effect will lighten the background and add a thin 3D raised edge.

Word Wrap

This parameter indicates how text is to be treated when it is multilined. Set this to 1 if you want the text to be word wrapped, that is, if you want to move words that don't fit to the next line. Set it to 0 if you want the text to always use the same number of lines, i.e., to just use CRLF as the line break. This parameter has no effect on single lined layouts.

Available Layout Types

APPTDATA

This layout item type displays appointment specific data. The type of appointment data displayed depends on the Value parameter. The Value parameter can be NAME, DESC, START, END, LEAD, TRAIL, LEADTEXT, TRAILTEXT, or SPAN. Each value and their settings are explained in detail below:

NAME

Displays the appointment's name. There are no Settings for this appointment data type.

DESC

Displays the appointment's description. It is recommended that the item be set to Multilined. There are no Settings for this appointment data type.

START

Displays the appointment's start date and time. There are 3 settings for this appointment data type:

PosNameTypeDescription
<1, 1, 1>Default FormatTextThe date & time format used in most cases
<1, 1, 2>Current Day FormatTextThe date & time format used when the time falls on the current day
<1, 1, 3>Add Lead TimeBooleanTrue to add the lead time to the start time

The first two settings format the date & time. The Default Format is used either when the date & time fall outside of the current day or when the Current Day Format is empty. The Current Day Format is used when the date & time fall within the current day. This allows you to display the date & time based on the given condition. Formatting for date & time is as follows:

Character(s)Displays
YYYears 00-99
YYYYYears 0001-2999
MMonths 1-12
MMMonths 01-12
MMMMonths Jan-Dec
MMMMMonths January-December
MMMMMMonths J-D
DDays 1-31
DDDays 01-31
DDDDays Sun-Sat
DDDDDays Sunday-Saturday
hHours 0-23
hhHours 00-23
mMinutes 0-59
mmMinutes 00-59
sSeconds 0-59
ssSeconds 00-59
0Milliseconds 0-9 (rounded to the nearest tenth)
00Milliseconds 00-99 (rounded to the nearest hundredth)
000Milliseconds 000-999
aa/p
aaam/pm
aaaa.m./p.m.
AA/P
AAAM/PM
AAAA.M./P.M.

Note that 'M' must be used for months and 'm' for minutes. All other codes can be either case. Here are some example date & time formats, all them for the date & time January 1, 2006 at 3:30:30.245 PM:

To Display AsUse
January 1, 2006 at 3:30 PMMMMM D, YYYY 'at' h:mm AA
Sunday, Jan 01, 2006DDDD, MMM DD, YYYY
2006-01-01 15:30:30YYYY-MM-DD hh:mm:ss

The third setting is a boolean flag. Set it to 1 if you want the lead time added to the start time. Set it to 0 or leave it blank to show the start time as is.

END

Displays the appointment's end date and time. There are 3 settings for this appointment data type:

PosNameTypeDescription
<1, 1, 1>Default FormatTextThe date & time format used in most cases
<1, 1, 2>Current Day FormatTextThe date & time format used when the time falls on the current day
<1, 1, 3>Subtract Trail TimeBooleanTrue to subtract the trail time from the end time

The first two settings are identical in operation as START. The third setting is a boolean flag, which when set to 1, subtracts the trail time from the end time.

LEAD

Displays the appointment's lead time. There is only one setting:

PosNameTypeDescription
<1, 1, 1>FormatTextThe date & time span format

The lead time is stored internally as a Date & Time Span, and it has it's own formatting rules.

Character(s)Displays
YTotal Years 0-5879610
YYTotal Years 00-5879610
YYYTotal Years 000-5879610
YYYYTotal Years 0000-5879610
MCurrent Months 0-12
MMCurrent Months 00-12
MMMTotal Months 0-70555326
DCurrent Days 0-365
DDCurrent Days 00-365
DDDCurrent Days 000-365
DDDDTotal Days 0-2147483647
hCurrent Hours 0-23
hhCurrent Hours 00-23
hhhTotal Hours 0-51539607528
mCurrent Minutes 0-59
mmCurrent Minutes 00-59
mmmTotal Minutes in Day 0-1439
mmmmTotal Minutes 0-3092376451680
sCurrent Seconds 0-59
ssCurrent Seconds 00-59
sssTotal Seconds in Day 0-86399
ssssTotal Seconds 0-185542587100800
0Current Milliseconds 0-9 (rounded to the nearest tenth)
00Current Milliseconds 00-99 (rounded to the nearest hundredth)
000Current Milliseconds 000-999
0000Total Milliseconds in Day 0-86399999
00000Total Milliseconds 0-185542587100800000

Note that 'M' must be used for month spans and 'm' for minute spans. All other codes can be either case. Here are some example date & time span formats, all them for a date & time span of 1 day and 90 mintues:


To Display AsUse
1 Day, 01:30:00DDDD 'Day', hh:mm:ss
1 Day, 90 minutesDDDD 'Day', mmm 'minutes'
1530 minutesmmmm 'minutes'

Note that Current Minutes denotes the leftover number of minutes. That is, the number of minutes beyond the current number of years, months, days, and hours. The same goes for all "Current" spans. Total Minutes in Day denotes the total number of minutes in the span byond the current day. The same goes for Seconds and Milliseconds. Total Minutes refers to the total number of minutes in the span. Any "Total" span is usally used by itself to show how many units are in the span, e.g., 1 day --> 24 hours --> 1440 minutes --> 86400 seconds.

TRAIL

Displays the appointment's trail time. Like LEAD, there is only one setting:

PosNameTypeDescription
<1, 1, 1>FormatTextThe date & time span format

See LEAD for details on formatting date & time spans.

LEADTEXT

Displays the appointment's lead time caption. There are no Settings for this appointment data type.

TRAILTEXT

Displays the appointment's trail time caption. There are no Settings for this appointment data type.

SPAN

Displays the length of the appointment. There are three settings:

PosNameTypeDescription
<1, 1, 1>FormatTextThe date & time span format
<1, 1, 2>Subtract Lead TimeBooleanTrue to subtract the lead time from the total appointment time
<1, 1, 3>Subtract Trail TimeBooleanTrue to subtract the trail time from the total appointment time

The first setting is the format. Refer to LEAD on how to format date & time spans. The seconds two flag indicate whether or not the span is adjusted by lead or trail times.

FLAGS

This layout item type displays images that correspond with the ApptFlags property. Each appointment comes with 32 flags that are all off by default. This layout type supplies one image for each flag, so when a flag is turned on, the image appears.

To set up this layout properly, you need to set the Value, Settings, and Horizontal Alignment values of the layout structure.

The Value parameter must point to a single image that contains up to 32 images to be determined in the Settings parameter. The indiviudal images must all be in the same single image file. You specify the file here and the number of frames within the image in the Settings value.

The Settings parameter consists of three sub-values:

PosNameTypeDescription
<1, 1, 1>Number of FramesIntegerThe number of frames to break the image file into
<1, 1, 2>Transparent ColorFormatted StringDetermines the color within the image file to be made completely transparent when rendering
<1, 1, 3>Space Between ImageIntegerThe number of pixels between each image

The first sub-value tells the layout how many frames to break the image into. So, if you break it into 4 frames, then you have images for flags 1 through 4.

The second sub-value determines which color to make transparent. You can set this to an RGB value, "Auto", or "None". "Auto" will use the top left pixel's color as the transparent color. This sub-value is ignored for file types with built-in alpha channels, such as PNGs.

The third sub-value let's you customize the spacing between icons.

So, those are the three settings you can use to set up the actual images. The only other step is to set the Horizontal Alignment value to determine whether the images are rendered starting from the "Left" or starting from the "Right". In either case, images always wrap to the next line when the edge of the layout area is reached. The "Center" value is ignored and treated the same as "Left".

Example

// Show the appointment's name, bold and centered on the top 
Layout<1, 1> = "APPTDATA"                   ;// We want to show appointment data 
Layout<1, 2> = 0:@SVM:0:@SVM:-1:@SVM:16     ;// Place it along the top, autowidth 
Layout<1, 3> = "NAME"                       ;// Value: Show the name 
Layout<1, 4> = ""                           ;// Settings: n/a 
Layout<1, 5> = @SVM:@SVM:700                ;// Make it bold 
Layout<1, 6> = "Center"                     ;// Center it 
Layout<1, 7> = "Center"                     ;// Center it vertically too 
Layout<1, 8> = 0                            ;// Single line only, since the height is not autosized 
Layout<1, 9> = ""                           ;// No background effect 
Layout<1, 10> = 1                           ;// Wrap is on, but it won't affect this single line layout 

// Show the appointment's description, centered underneath the title 
Layout<2, 1> = "APPTDATA"                   ;// We want to show appointment data 
Layout<2, 2> = 0:@SVM:20:@SVM:-1:@SVM:-1    ;// Place it below the name, autowidth and autoheight 
Layout<2, 3> = "DESC"                       ;// Value: Show the description 
Layout<2, 4> = ""                           ;// Settings: n/a 
Layout<2, 5> = ""                           ;// Default font: Tahoma, 8 pt. 
Layout<2, 6> = "Center"                     ;// Center it horizontally 
Layout<2, 7> = "Top"                        ;// Place it at the top of the rectangle 
Layout<2, 8> = 1                            ;// Multilined 
Layout<2, 9> = ""                           ;// No background effect 
Layout<2, 9> = 0                            ;// Don't wrap words, just use CRLF for breaks 
    
// Show the appointment's flag icons over the appointment starting from the top left corner 
Layout<3, 1> = "FLAGS"                      ;// We want to show images based on ApptFlags 
Layout<3, 2> = 0:@SVM:0:@SVM:18:@SVM:-1     ;// Have it cover the whole appointment (it'll be on top) 
Layout<3, 3> = "BMPS\Flags.png"             ;// Value: The image path 
Layout<3, 4> = 32:@SVM:@SVM:1               ;// Settings: 32 frames and 1 pixel between images 
Layout<3, 5> = ""                           ;// Default font: n/a 
Layout<3, 6> = "Left"                       ;// Horizontal Alignment: Left (only other option is Right) 
Layout<3, 7> = ""                           ;// Vertical Alignment: n/a 
Layout<3, 8> = ""                           ;// Multilined: n/a 
Layout<3, 9> = ""                           ;// No background effect 
Layout<3, 10> = 0                           ;// Word wrapping: n/a 

Set_Property(@Window:".OLE_SCHEDULE", "OLE.Layout", Layout)

See Also

LeadLayoutTrailLayout

  • No labels