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

VScrollBar Arrow Text

3 Answers 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 12 Apr 2010, 07:42 AM
How do I add the text to the arrow up and arrow down buttons of the vertical scrollbar. For example I want the up button to also display text "UP" in addition to the arrow element.

3 Answers, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 12 Apr 2010, 02:40 PM
Hi Alex,

Yes, this is possible. However, you should also replace the arrow to have a consistent look. Here is a sample on how to add text in the top scrollbar button:

RadLabelElement label = new RadLabelElement();
label.Margin = new Padding(5, 0, 5, 0);
label.Text = "UP";
label.TextAlignment = ContentAlignment.TopCenter;
this.radGridView1.GridElement.VScrollBar.FirstButton.Children.Add(label);
this.radGridView1.GridElement.VScrollBar.MinSize = new Size(50, 0);

If you have further questions, please describe in detail the exact look that you want to achieve and I will be glad to help.

Greetings,
Jack
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Alex
Top achievements
Rank 1
answered on 03 Sep 2010, 04:02 AM
When I use the code that you supplied, the up and down buttons stop working. I can scroll up and down by clicking (or dragging) the scroll bar body, but the buttons become non-responsive.

Thanks
0
Jack
Telerik team
answered on 07 Sep 2010, 04:16 PM
Hello Alex,

I understand. In this case you should set the ShouldHandleMouseInput property for the label element to false. Here is the modified sample:

RadLabelElement label = new RadLabelElement();
label.ShouldHandleMouseInput = false;
label.Margin = new Padding(5, 0, 5, 0);
label.Text = "UP";
label.TextAlignment = ContentAlignment.TopCenter;
label.Click += new EventHandler(label_Click);
this.radGridView1.TableElement.VScrollBar.FirstButton.Children.Add(label);
this.radGridView1.TableElement.VScrollBar.MinSize = new Size(50, 0);

I hope this helps.

All the best,
Jack
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Alex
Top achievements
Rank 1
Answers by
Jack
Telerik team
Alex
Top achievements
Rank 1
Share this question
or