# Advanced Cluster Part 3

In part 3 of this Best Practice the Custom\_Gauge control will be further customized adding controls:

- A **TextValue control** to display the gauge's current value numerically
- A **Text control** above of the numeric value to display the gauge's scope (e.g. speed)
- Another **Text control** below the numeric value, which can be used to display the unit (e.g. km/h)

In order to make our control more versatile, various properties of our configured Custom\_Gauge (like all images and text styles) will be made public.

<p class="callout info">**Public Control Properties** are those that can be configured when using a Custom\_Gauge in a scene. </p>

#### Create and Configure Two TextNodes and a TextValue Node

1. In Scene Composer's Solution Explorer navigate to the path below and double-click on the "Custom\_Gauge" control. 
    - The Scene Tree panel shows the Custom\_Gauge control's tree.
    - Scene editor displays the Custom\_Gauge control.  
        <table border="1" class="align-center" id="bkmrk-property-image-norma-1" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 283.667px;"><span style="color: white;">**Path in Solution Explorer**</span></td><td style="background-color: rgb(53, 152, 219); width: 315.667px;"><span style="color: white;">**Control**</span></td></tr><tr><td style="width: 283.667px;">Solution/Controls</td><td style="width: 315.667px;">Custom\_Gauge</td></tr></tbody></table>
2. From the **Toolbox** panel's **Nodes 2D** section drag and drop a **StackLayout** into the Scene Tree panel directly onto the Custom\_Gauge node. 
    - In the Scene Tree panel you can see that a **StackLayout** has been created directly under the Custom\_Gauge node.
3. From the **Toolbox** panel's **Controls** section under Common drag and drop **2 Text** controls and **1 Text Value** control into the Scene Tree panel directly onto the StackLayout. 
    - In the Scene Tree panel you can see the **2 Text** controls and the **Text Value** control directly under the StackLayout.
4. In the Scene Tree panel select the **StackLayout** as well as the **2 Text** controls one after the other and rename them according to the table below either via the context menu entry "Rename" or by pressing &lt;F2&gt; on your keyboard. 
    - In the Scene Tree panel you can see that the Controls have been renamed.  
        <table border="1" class="align-center" id="bkmrk-target-item-new-name" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 283.667px;"><span style="color: white;">**Target Item**</span></td><td style="background-color: rgb(53, 152, 219); width: 315.667px;"><span style="color: white;">**New Name**</span></td></tr><tr><td style="width: 283.667px;">StackLayout</td><td style="width: 315.667px;">StackLayout\_Texts</td></tr><tr><td style="width: 283.667px;">Text</td><td style="width: 315.667px;">Text\_Top</td></tr><tr><td style="width: 283.667px;">Text\_1</td><td style="width: 315.667px;">Text\_Bottom</td></tr></tbody></table>
5. In the Scene Tree panel re-arrange StackLayout\_Texts and its contents via drag and drop until it looks like in the image below. 
    - The Scene Tree looks as in the image below. <div drawio-diagram="8563"><img src="https://doc316en.candera.eu/uploads/images/drawio/2025-09/drawing-5-1757057054.png" alt=""/></div>
6. In the Scene Tree panel select StackLayout\_Texts controls. In the **Properties** panel under **Layouter** and **Layout** adjust the properties as in the table below. 
    - In the Properties panel you can see that the correct values are set.  
        <table border="1" class="align-center" id="bkmrk-property-value-layou" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 300px;"><span style="color: white;">**Property**</span></td><td colspan="2" style="background-color: rgb(53, 152, 219); width: 300px;"><span style="color: white;">**Value**</span></td></tr><tr><td colspan="3" style="background-color: rgb(35, 111, 161);">**<span style="color: rgb(255, 255, 255);">Layouter</span>**</td></tr><tr><td style="width: 300px;">Arrangement</td><td colspan="2" style="width: 300px;">Vertical</td></tr><tr><td colspan="3" style="width: 600px; background-color: rgb(35, 111, 161);">**<span style="color: rgb(255, 255, 255);">Layout</span>**</td></tr><tr><td style="width: 300px;">Vertical Alignment</td><td colspan="2" style="width: 300px;">VCenter</td></tr><tr><td style="width: 300px;">MinimumSize</td><td style="width: 50px;">**X**</td><td style="width: 250px;">250.00</td></tr><tr><td style="width: 300px;"> </td><td style="width: 50px;">**Y**</td><td style="width: 250px;">0.00</td></tr></tbody></table>
7. In the Scene tree panel select **Text\_Top**, **Text Value** and **Text\_Bottom** one after the other. In the **Properties** panel under Layout and Control configure the properties as in the table below. 
    - In the Properties panel you can see that the correct values are set.
    - In the Scene Editor the texts are centered and the Text Value appears in a bigger font.
    
    <table border="1" class="align-center" id="bkmrk-property-text_top-te" style="border-collapse: collapse; width: 634px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 186px;"><span style="color: white;">**Property**</span></td><td style="background-color: rgb(53, 152, 219); width: 130.667px;"><span style="color: white;">**Text\_Top**</span></td><td style="background-color: rgb(53, 152, 219); width: 135.667px;"><span style="color: white;">**Text Value**</span></td><td colspan="2" style="background-color: rgb(53, 152, 219); width: 181px;"><span style="color: white;">**Text\_Bottom**</span></td></tr><tr><td colspan="5" style="background-color: rgb(35, 111, 161); width: 633.334px;">**<span style="color: rgb(255, 255, 255);">Layout</span>**</td></tr><tr><td style="width: 186px;">VerticalAlignment</td><td style="width: 130.667px;">VCenter</td><td style="width: 135.667px;">VCenter</td><td colspan="2" style="width: 181px;">VCenter</td></tr><tr><td style="width: 186px;">HorizontalAlignment</td><td style="width: 130.667px;">HCenter</td><td style="width: 135.667px;">HCenter</td><td colspan="2" style="width: 181px;">HCenter</td></tr><tr><td colspan="5" style="width: 633.334px; background-color: rgb(35, 111, 161);"><span style="color: rgb(255, 255, 255);">**Control**</span></td></tr><tr><td style="width: 186px;">Text</td><td style="width: 130.667px;">RPM</td><td style="width: 135.667px;">-</td><td colspan="2" style="width: 181px;">&lt;empty String&gt;</td></tr><tr><td style="width: 186px;">Text Style</td><td style="width: 130.667px;">OpenSans35
    
    </td><td style="width: 135.667px;">Vera96</td><td colspan="2" style="width: 181px;">OpenSans35</td></tr><tr><td style="width: 186px;">Text Alignment</td><td style="width: 130.667px;">Center</td><td style="width: 135.667px;">Center</td><td colspan="2" style="width: 181px;">Center</td></tr><tr><td style="width: 186px;">Text Format</td><td style="width: 130.667px;">-</td><td style="width: 135.667px;">%04d</td><td colspan="2" style="width: 181px;">-</td></tr></tbody></table>

#### Configure the TextNodes' and TextValue Node's Position

1. In the Scene Tree panel select **StackLayout\_Texts**. In the Scene Tree panel's right side click on the **\[Fusion...\]** button. 
    - Fusion will be opened covering the Scene Editor.
    - StackLayout\_Texts Fusion diagram will be displayed. It only has one Fusion Node.
2. In Fusion use the StackLayout\_Texts' "Behaviors" connector to add 2 new Fusion Nodes: Connect **2 Value Processing &gt; Value** behaviors to the StackLayout\_Texts Fusion Node. <p class="callout info">Please check <span style="color: rgb(230, 126, 35);">[Fusion's Basic Operations ](https://doc316en.candera.eu/books/fusion/page/basic-operations#bkmrk-adding-a-fusion-node)</span>documentation on how to add Fusion Nodes. </p>
    
    
    - In Fusion 2 new Fusion Nodes "**Value**" and "**Value\_1**" have been created.
3. In Fusion select and right-click on the behavior nodes and rename them according to the table below. 
    - In Fusion the Value behavior fusion nodes have been renamed.  
        <table border="1" class="align-center" id="bkmrk-target-item-new-name-1" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 283.667px;"><span style="color: white;">**Target Item**</span></td><td style="background-color: rgb(53, 152, 219); width: 315.667px;"><span style="color: white;">**New Name**</span></td></tr><tr><td style="width: 283.667px;">Value</td><td style="width: 315.667px;">Value\_TextPos\_X</td></tr><tr><td style="width: 283.667px;">Value\_1</td><td style="width: 315.667px;">Value\_TextPos\_Y</td></tr></tbody></table>
4. In Fusion use the Value behaviors' "Receivers" connectors to add a **Value Processing &gt; Transformation &gt; SetPosition** Fusion Node to each of them.  
    
    - In Fusion 2 new Fusion Nodes "**Set Position**" have been created, one of which is connected to Value\_TextPos\_X, the other to Value\_TextPos\_Y.
5. In Fusion select and right-click on the behavior nodes and rename them according to the table below. 
    - In Fusion the **Set Position** behavior fusion nodes have been renamed.  
        <table border="1" class="align-center" id="bkmrk-target-item-new-name-2" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 283.667px;"><span style="color: white;">**Target Item**</span></td><td style="background-color: rgb(53, 152, 219); width: 315.667px;"><span style="color: white;">**New Name**</span></td></tr><tr><td style="width: 283.667px;">Value\_TextPos\_X &gt; Set Position</td><td style="width: 315.667px;">Set Position\_X</td></tr><tr><td style="width: 283.667px;">Value\_TextPos\_Y &gt; Set Position</td><td style="width: 315.667px;">Set Position\_Y</td></tr></tbody></table>
6. In Fusion configure the behaviors' Fusion Nodes according to the table below. 
    - In Fusion the Fusion Nodes' Properties have been changed.
    - In Scene Editor the position of StackLayout\_Texts has been changed. The texts are now neatly placed inside the Custom\_Gauge control as you can see in the image below. <table border="1" class="align-center" id="bkmrk-fusion-node-property" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 145.333px;"><span style="color: white;">  
        </span></td><td colspan="2" style="background-color: rgb(53, 152, 219); width: 454px;"><span style="color: white;">**Fusion Node**</span></td></tr><tr><td style="background-color: rgb(53, 152, 219); width: 145.333px;"><span style="color: white;">**Property**</span></td><td style="background-color: rgb(53, 152, 219); width: 218.5px;"><span style="color: white;">**Set Position\_X**</span></td><td style="background-color: rgb(53, 152, 219); width: 235.5px;"><span style="color: white;">**Set Position\_Y**</span></td></tr><tr><td style="width: 145.333px;">TargetNode</td><td style="width: 218.5px;">Custom\_Gauge &gt; StackLayout\_Texts
        
        </td><td style="width: 235.5px;">Custom\_Gauge &gt; StackLayout\_Texts</td></tr><tr><td style="width: 145.333px;">TranslationAxis2D</td><td style="width: 218.5px;">AxisX</td><td style="width: 235.5px;">AxisY</td></tr><tr><td style="background-color: rgb(53, 152, 219); width: 145.333px;"><span style="color: white;">**Property**</span></td><td style="background-color: rgb(53, 152, 219); width: 218.5px;"><span style="color: white;">**Value\_TextPosX**</span></td><td style="background-color: rgb(53, 152, 219); width: 235.5px;"><span style="color: white;">**Value\_TextPosY**</span></td></tr><tr><td style="width: 145.333px;">Variant</td><td style="width: 218.5px;">(Float) 205</td><td style="width: 235.5px;">(Float) 230</td></tr></tbody></table>
        
        <div drawio-diagram="8594"><img src="https://doc316en.candera.eu/uploads/images/drawio/2025-09/drawing-5-1758889195.png" alt=""/></div>

#### Configure Value Forwarding and Maximum Value

1. In Fusion add a **Value Processing &gt; Forward Value** behavior to the **Behaviors** connector of the **Custom\_Gauge** Fusion Node. Configure its **TargetNode** according to the table below. 
    - In Fusion the property will be changed accordingly.  
        <table border="1" class="align-center" id="bkmrk-forward-value-fusion" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 211.667px;"><span style="color: white;">**Forward Value Fusion Node**</span></td><td style="background-color: rgb(53, 152, 219); width: 387.667px;"> </td></tr><tr><td style="background-color: rgb(53, 152, 219); width: 211.667px;"><span style="color: white;">**Property**</span></td><td style="background-color: rgb(53, 152, 219); width: 387.667px;"><span style="color: white;">**Value**</span></td></tr><tr><td style="width: 211.667px;">TargetNode</td><td style="width: 387.667px;">Custom\_Gauge &gt; StackLayout\_Texts &gt; Text Value</td></tr></tbody></table>
2. In Fusion in the **ControlValueProvider** Fusion Node configure the property **Maximum** according to the table below. 
    - In Fusion the the property is changed accordingly.
    - Custom\_Gauge's Fusion diagram will look as in the image below. <table border="1" class="align-center" id="bkmrk-controlvalueprovider" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td style="background-color: rgb(53, 152, 219); width: 211.667px;"><span style="color: white;">**ControlValueProvider**</span></td><td style="background-color: rgb(53, 152, 219); width: 387.667px;"><span style="color: white;">  
        </span></td></tr><tr><td style="background-color: rgb(53, 152, 219); width: 211.667px;"><span style="color: white;">**Property**</span></td><td style="background-color: rgb(53, 152, 219); width: 387.667px;"><span style="color: white;">**Value**</span></td></tr><tr><td style="width: 211.667px;">Maximum</td><td style="width: 387.667px;">(Float) 8000.00</td></tr></tbody></table>
        
        <div drawio-diagram="8593"><img src="https://doc316en.candera.eu/uploads/images/drawio/2025-09/drawing-5-1758889102.png" alt=""/></div>

#### Configure Public Control Properties

1. In the Scene Tree panel right click "Custom\_Gauge" and select "**Control Properties...**" from the context menu. 
    - The Configure Public Control Properties dialog will be opened.
2. In the Configure Public Properties dialog the Properties which should be public to the user of the Custom\_Gauge control need to be marked with the "Is Public" checkbox. Check the "Is Public" checkbox and eventually change the image properties' names according to the table and images below. 
    - Image properties necessary for using and configuring the Custom\_Gauge will be made public.
    - The Custom\_Gauge control is now fully configured and ready to use.  
        <table border="1" class="align-center" id="bkmrk-custom_gauge-%3E-group" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td class="align-left" colspan="4" style="background-color: rgb(53, 152, 219); width: 599.332px;"><span style="color: white;">**Custom\_Gauge &gt; Group\_Bitmaps &gt;** </span></td></tr><tr><td style="background-color: rgb(53, 152, 219); width: 238.833px;"><span style="color: white;">**Property** </span></td><td style="background-color: rgb(53, 152, 219); width: 60.833px;"><span style="color: white;">**Is Public**</span></td><td style="background-color: rgb(53, 152, 219); width: 149.833px;"><span style="color: white;">**Source**</span></td><td style="background-color: rgb(53, 152, 219); width: 149.833px;"><span style="color: white;">**Name**</span></td></tr><tr><td style="width: 238.833px;">BackgroundImage &gt; ProvideImageProperty</td><td style="width: 60.833px;">x</td><td style="width: 149.833px;">Image</td><td style="width: 149.833px;">BackgroundImage</td></tr><tr><td style="width: 238.833px;">NeedleImage &gt; ProvideImageProperty</td><td style="width: 60.833px;">x</td><td style="width: 149.833px;">Image</td><td style="width: 149.833px;">NeedleImage</td></tr><tr><td style="width: 238.833px;">NeedleEffectImage &gt; ProvideImageProperty</td><td style="width: 60.833px;">x</td><td style="width: 149.833px;">Image</td><td style="width: 149.833px;">NeedleEffectImage</td></tr><tr><td style="width: 238.833px;">ForegroundImage &gt; ProvideImageProperty</td><td style="width: 60.833px;">x</td><td style="width: 149.833px;">Image</td><td style="width: 149.833px;">ForegroundImage</td></tr></tbody></table>
        
        <div drawio-diagram="8574"><img src="https://doc316en.candera.eu/uploads/images/drawio/2025-09/drawing-5-1757075534.png" alt=""/></div>
3. In the Configure Public Properties dialog check the "Is Public" checkbox and perform other configurations according to the table and images below. 
    - Image properties necessary for using and configuring the Custom\_Gauge will be made public.
    - The Custom\_Gauge control is now fully configured and ready to use. <p class="callout info">The properties made public in this **Configure Public Properties** dialog will be configurable in the **Properties panel's Controls section**.</p>

<table border="1" class="align-center" id="bkmrk-custom_gauge-%3E-stack" style="border-collapse: collapse; width: 600px; border-width: 1px;"><tbody><tr><td class="align-left" colspan="4" style="background-color: rgb(53, 152, 219); width: 599.332px;"><span style="color: white;">**Custom\_Gauge &gt; StackLayout\_Texts &gt;**</span></td></tr><tr><td style="background-color: rgb(53, 152, 219); width: 179.833px;"><span style="color: white;">**Property**</span></td><td style="background-color: rgb(53, 152, 219); width: 119.833px;"><span style="color: white;">**IsPublic**</span></td><td style="background-color: rgb(53, 152, 219); width: 149.833px;"><span style="color: white;">**Source**</span></td><td style="background-color: rgb(53, 152, 219); width: 149.833px;"><span style="color: white;">**Name**</span></td></tr><tr><td style="width: 179.833px;">TextBottom</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">Text</td><td style="width: 149.833px;">Bottom\_Text</td></tr><tr><td style="width: 179.833px;">  
</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">TextColor</td><td style="width: 149.833px;">Bottom\_TextColor</td></tr><tr><td style="width: 179.833px;">  
</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">TextStyle</td><td style="width: 149.833px;">Bottom\_TextStyle</td></tr><tr><td style="width: 179.833px;">Text\_Top</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">Text</td><td style="width: 149.833px;">Top\_Text</td></tr><tr><td style="width: 179.833px;">  
</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">TextColor</td><td style="width: 149.833px;">Top\_TextColor</td></tr><tr><td style="width: 179.833px;">  
</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">TextStyle</td><td style="width: 149.833px;">Top\_TextStyle</td></tr><tr><td style="width: 179.833px;">Text Value</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">FormatText</td><td style="width: 149.833px;">Value\_FormatText</td></tr><tr><td style="width: 179.833px;">  
</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">Style</td><td style="width: 149.833px;">Value\_Style</td></tr><tr><td style="width: 179.833px;">  
</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">TextColor</td><td style="width: 149.833px;">Value\_TextColor</td></tr><tr><td style="width: 179.833px;">Behaviors &gt; Value\_TextPos\_X</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">Variant</td><td style="width: 149.833px;">TextPosX</td></tr><tr><td style="width: 179.833px;">Behaviors &gt; Value\_TextPos\_Y</td><td style="width: 119.833px;">x</td><td style="width: 149.833px;">Variant</td><td style="width: 149.833px;">TextPosY</td></tr></tbody></table>

<div drawio-diagram="8573"><img src="https://doc316en.candera.eu/uploads/images/drawio/2025-09/drawing-5-1757075516.png" alt=""/></div>