---
tags:
    - "UI, User, Interface"
---

# Scrollbar Size

[UI](../../index.md) / [Scroll](../index.md) / [Scrollbar](index.md) / **Scrollbar Size**

## Description

Compares the Size property of Scrollbar component to another value

## Parameters

| Name | Description |
| :--- | :---------- |
| Scrollbar |  |
| Compare |  |
| Value |  |

## Code

```cs
// <auto-generated>
// This script was automatically generated using the Visual Script Transpiler.
// Do not modify. Changes to this file will be lost when updating the package.
// </auto-generated>

using System;
using UnityEngine;
using VisualScript.Icons;
using UnityEngine.UI;

namespace VisualScript.Runtime
{
    [Title("Scrollbar Size")]
    [Category("UI/Scroll/Scrollbar/Size")]
    [Description("Compares the Size property of Scrollbar component to another value")]
    
    [Image(typeof(IconScrollBar), ColorTheme.Type.TextLight)]
    [Keywords("UI, User, Interface")]
    
    [Parameter("Scrollbar")]
    [Parameter("Compare")]
    [Parameter("Value")]
    
    [Serializable]
    public class GenConditionNumber_Scrollbar_CheckSize : Condition
    {
        [SerializeField] private GetGameObject m_Scrollbar = new GetGameObject(
            new GenTypeGameObject_Scrollbar()
        );
        
        [SerializeField] private CompareNumber m_Compare = new CompareNumber();
        
        [SerializeField] private GetNumber m_Value = new GetNumber();
        
        protected override string GetTitle(GameObject source)
        {
            string member = TextUtils.ThemeAsKeyword("Size");
            return $"{this.m_Scrollbar} {member} {this.m_Compare} {this.m_Value}";
        }
        
        protected override bool Run(Args args)
        {
            Scrollbar component = this.m_Scrollbar.Get<Scrollbar>(args);
            if (component == null) return false;
            
            return this.m_Compare.Compare(component.size, (float) this.m_Value.Get(args));
        }
    }
}


```

