HoverActiveEffects: IVZEffects;
HoverActiveEffects: Prognoz.Platform.Interop.Vizualizators.IVZEffects;
The HoverActiveEffects property determines effects applied to the hovered element.
To set up effects, use properties of the IVZBrushEffect, IVZBorderEffect, IVZAlphaChannelEffect interfaces.
Executing the example requires that the repository contains an express report with the EXPRESS identifier.
Add links to the Drawing, Express, Metabase, Visualizators system assemblies.
Sub userProc;
Var
Metabase: IMetabase;
EaxAnalyzer: IEaxAnalyzer;
EMap: IVZMapChart;
BrEffect: IVZBrushEffect;
BoEffect: IVZBorderEffect;
Color: IGxColor;
Feather: IGxPen;
Begin
Metabase := MetabaseClass.Active;
EaxAnalyzer := Metabase.ItemById("EXPRESS").Edit As IEaxAnalyzer;
// Get express report map as a visualizer
EMap := EaxAnalyzer.MapChart.MapChart;
// Set up fill
BrEffect := New VZBrushEffect.Create;
Color := New GxColor.CreateRGB(255,255,255);
BrEffect.BackgroundBrush := New GxSolidBrush.Create(Color);
// Set up borders
BoEffect:= New VZBorderEffect.Create;
Color := New GxColor.CreateRGB(0,0,0);
Feather := New GxPen.CreateSolid(Color,2);
BoEffect.BorderPen := Feather;
// Determine effect on mouse over the active element
EMap.HoverActiveEffects := New VZEffects.Create;
EMap.HoverActiveEffects.Add(BrEffect);
// Determine effect on mouse over the inactive element
EMap.HoverInactiveEffects := New VZEffects.Create;
EMap.HoverInactiveEffects.Add(BoEffect);
// Determine effect of active element selection
Color := New GxColor.CreateRGB(255,0,0);
BrEffect.BackgroundBrush := New GxSolidBrush.Create(Color);
EMap.SelectActiveEffects := New VZEffects.Create;
EMap.SelectActiveEffects.Add(BrEffect);
// Determine effect of inactive element selection
Color := New GxColor.CreateRGB(0,255,0);
BrEffect.BackgroundBrush := New GxSolidBrush.Create(Color);
EMap.SelectInactiveEffects := New VZEffects.Create;
EMap.SelectInactiveEffects.Add(BrEffect);
(EaxAnalyzer As IMetabaseObject).Save;
End Sub UserProc;
After executing the example the following effects are set:
Active area is filled with white on mouse over.
Inactive area is bordered with black on mouse over.
Active area is filled with red on selection.
Inactive area is filled with green on selection.
The requirements and result of the Fore.NET example execution match with those in the Fore example.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Express;
Imports Prognoz.Platform.Interop.Visualizators;
Imports Prognoz.Platform.Interop.Drawing;
…
Public Shared Sub Main(Params: StartParams);
Var
Metabase: IMetabase;
EaxAnalyzer: IEaxAnalyzer;
EMap: IVZMapChart;
BrEffect: IVZBrushEffect;
Brush: GxSolidBrush;
BoEffect: IVZBorderEffect;
Color: GxColorClass;
Begin
Metabase := Params.Metabase;
EaxAnalyzer := Metabase.ItemById["EXPRESS"].Edit() As IEaxAnalyzer;
// Get express report map as a visualizer
EMap := EaxAnalyzer.MapChart.MapChart;
// Set up border highlighting
Color := New GxColorClassClass();
Brush := New GxSolidBrushClass();
Brush.Create(Color.FromName("Green"));
BrEffect := New VZBrushEffect.Create();
BrEffect.BackgroundBrush := Brush;
// Determine effect on mouse over the active element
EMap.HoverActiveEffects := New VZEffects.Create();
EMap.HoverActiveEffects.Add(BrEffect);
// Determine effect on mouse over the inactive element.
Brush.Create(Color.FromName("Red"));
BrEffect.BackgroundBrush := Brush;
EMap.HoverInactiveEffects := New VZEffects.Create();
EMap.HoverInactiveEffects.Add(BrEffect);
// Determine effect of active element selection
Brush.Create(Color.FromName("Blue"));
BrEffect.BackgroundBrush := Brush;
EMap.SelectActiveEffects := New VZEffects.Create();
EMap.SelectActiveEffects.Add(BrEffect);
// Determine effect of inactive element selection
Brush.Create(Color.FromName("Black"));
BrEffect.BackgroundBrush := Brush;
EMap.SelectInactiveEffects := New VZEffects.Create();
EMap.SelectInactiveEffects.Add(BrEffect);
(EaxAnalyzer As IMetabaseObject).Save();
End Sub;
See also: