Conditions to determine which special effect to apply to a tab's image.
Usage
Set_Property(OLECtrlEntID, "OLE.TabImageEffects[Index]", StringValue)
Values
StringValue can be any string meeting the following format requirements:
Syntax: @FM delimited list of conditions
Default: ""
Remarks
The TabImageEffects property allows you to automate which special effect should be applied to a tab's image. You provide an ordered list of specially formatted condition statements telling the control what state the tab must be in order to apply a particular effect. When the SRP Tab Control is about to display its a tab's image, it evaluates each condition in order and, if one of them is true, applies the associated effect.
Each field has two values: Effect and Condition. The Effect value identifies one of the available effects.
Effect | Description |
---|---|
Saturate | Saturates the image slightly so that normal images stand out more |
Grayscale | Displays the image in grayscale instead of full color |
Levitate | Displays the image slightly raised with a drop shadow |
Faded | Displays the image translucently over the background |
TextColor | Displays the image as in monochrome matching the text's current color. |
Default | The control draws the image normally if enabled or grayed out if disabled |
The second value of each field, the Condition value, is the condition in which the effect is to be used. Each field in this property as a like case statement. So, the property value might look something like this:
Conditions<1> = "Levitate":@VM:"Hot" Conditions<2> = "Default":@VM:"Selected" Conditions<3> = "Saturated":@VM:"1"
However, you can visualize the property to mean this:
Begin Case Case Hot ApplyLevitateEffect() Case Selected ApplyDefaultEffect() Case 1 ApplySaturatedEffect() End Case
The SRP Tab Control will first check to see if the tab is hot, and if it is, it will apply the Levitate effect to the tab's image. If the tab is not hot, then it will check to see if it is the selected tab, and if it is, it will apply the Default effect (which is to say, no effect at all). If it is not the selected tab, then it will apply the Saturated effect.
The following operators are available to you when writing conditions:
Name | Operator(s) | Example |
---|---|---|
Logical OR | OR, || | "Selected OR Hot" |
Logical AND | AND, && | "Hot AND Enabled" |
Not | Not(expr), !expr | "Not(Selected)" |
The SRP Tab Control allows the use of a limited set of keywords in your conditions. Keywords identify a particular state of a tab. You may use the following keywords in your condition statement:
Keyword | Type | Description |
---|---|---|
Selected | Boolean | The tab's selected state. If true, then it is the currently selected tab. |
Hot | Boolean | The tab's hot state, which means the mouse is hovering over it |
Enabled | Boolean | The tab's enabled state. |
If your conditions do not seem to working, double check your syntax. The condition is case insensitive, but you must spell the keywords correctly.
To make a condition that evaluates to true in all cases, just set it to "1".
Example
// Image effects based on tab states Conditions = "" Conditions<1> = "Levitate":@VM:"Hot" Conditions<2> = "Default":@VM:"Selected" Conditions<3> = "Saturated":@VM:"1" Set_Property(@Window:".OLE_TAB", "OLE.TabImageEffects[All]", Conditions)