This is a migrated thread and some comments may be shown as answers.

RadHScrollBar can not scroll to maximum value.

1 Answer 64 Views
ScrollBar
This is a migrated thread and some comments may be shown as answers.
Johnny
Top achievements
Rank 1
Veteran
Johnny asked on 02 Jan 2021, 03:39 PM

As title. Followed as my code and screen shot as attachment.

public partial class Form3 : Form
{
    public Form3()
    {
        this.InitializeComponent();
 
        this.label1.Text = this.radHScrollBar1.Minimum.ToString();
        this.label2.Text = this.radHScrollBar1.Maximum.ToString();
    }
 
    private void button1_Click(object sender, System.EventArgs e)
    {
        this.textBox1.Text = this.radHScrollBar1.Value.ToString();
    }
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Nadya | Tech Support Engineer
Telerik team
answered on 06 Jan 2021, 09:53 AM

Hello, Johnny,

The Value property gets a numeric value that represents the current position of the scroll thumb on the scroll bar. The LargeChange property sets the amount by which the scroll thumb position changes when a user clicks the scroll thumb. This property allows you to change how much to scroll using the RadHScrollBar. Please refer to the following code snippet updated:

public RadForm1()
{
    InitializeComponent();
    this.radHScrollBar1.LargeChange = 1;
    this.radLabel1.Text = this.radHScrollBar1.Minimum.ToString();
    this.radLabel2.Text = this.radHScrollBar1.Maximum.ToString();
}

private void radButton1_Click(object sender, EventArgs e)
{
    this.radTextBox1.Text = this.radHScrollBar1.ScrollBarElement.Value.ToString();
}

I hope this helps. Should you have other questions do not hesitate to ask.

Regards,
Nadya
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
ScrollBar
Asked by
Johnny
Top achievements
Rank 1
Veteran
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or