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.

EffectDescription
SaturateSaturates the image slightly so that normal images stand out more
GrayscaleDisplays the image in grayscale instead of full color
LevitateDisplays the image slightly raised with a drop shadow
FadedDisplays the image translucently over the background
TextColorDisplays the image as in monochrome matching the text's current color.
DefaultThe 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:

NameOperator(s)Example
Logical OROR, ||"Selected OR Hot"
Logical ANDAND, &&"Hot AND Enabled"
NotNot(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:

KeywordTypeDescription
SelectedBooleanThe tab's selected state. If true, then it is the currently selected tab.
HotBooleanThe tab's hot state, which means the mouse is hovering over it
EnabledBooleanThe 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)

See Also

TabImage

  • No labels