Splitter Width

2 Answers 265 Views
Splitter
Daryl
Top achievements
Rank 1
Daryl asked on 14 Sep 2021, 08:05 PM
How can I change the width of the Splitter itself?

2 Answers, 1 is accepted

Sort by
0
Nikolas
Top achievements
Rank 2
Iron
Iron
answered on 16 Sep 2021, 09:21 AM

Hello Daryl,

If you are talking about the splitter div for resizing, I did it with CSS, could not get it working with other methods.

.k-splitbar-horizontal {
       width: 15px !important; 
}

.k-splitbar-vertical {
       height: 15px !important;
}

If it's the size of the pane, then here is the docs link:
https://docs.telerik.com/blazor-ui/components/splitter/overview

Best regards,
Nikolas

Daryl
Top achievements
Rank 1
commented on 16 Sep 2021, 12:20 PM

This works for me. Thank you!
0
Dimo
Telerik team
answered on 16 Sep 2021, 12:38 PM

Hi Daryl,

The Splitter tag exposes Width and Height attributes for setting dimensions in different units.

In case you are asking about dynamic resizing, this is possible as well.

<p>
    Set the Splitter width here (@Min.ToString() - @Max.ToString()):
    <TelerikNumericTextBox Min="@Min" Max="@Max" Decimals="0" @bind-Value="@SpliterWidth" />
</p>

<TelerikSplitter Orientation="SplitterOrientation.Horizontal" Height="200px" Width="@( Math.Max(SpliterWidth, Min) + "px" )">
    <SplitterPanes>

        <SplitterPane Collapsible="true">
            Pane 1
        </SplitterPane>

        <SplitterPane Collapsible="true">
            Pane 2
        </SplitterPane>

    </SplitterPanes>
</TelerikSplitter>

@code {
    int SpliterWidth = 400;
    int Min = 100;
    int Max = 1000;
}

Regards,
Dimo
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Splitter
Asked by
Daryl
Top achievements
Rank 1
Answers by
Nikolas
Top achievements
Rank 2
Iron
Iron
Dimo
Telerik team
Share this question
or