VerticalScrollState and EnableKineticScrolling Problem

9 posts, 0 answers
  1. Bekir
    Bekir avatar
    16 posts
    Member since:
    Sep 2010

    Posted 05 Jun 2013 Link to this post

    Hi,
    When I set in RadListView "VerticalScrollState" to "AlwaysHide", kinetic scrolling doesn't work and mouse wheel scrolling doesn't work. I don't want to see scroll bar and I want to hide it. And also "VerticalScroll.Visible = false" doesn't work.
    Best regards.
  2. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 10 Jun 2013 Link to this post

    Hello Bekir,

    Thank you for writing.

    I was able to reproduce the issue you have described and have logged it in our Public Issue Tracking System - PITS. You can track the progress of the issue subscribe for status change alerts and add your vote/comment to it on the following link - PITS Issue. Until the issue is resolved you can workaround the issue and hide the scrollbar by using the following code:
    this.radListView1.ListViewElement.ViewElement.Scroller.Scrollbar.MaxSize = new Size(1, 1);
    this.radListView1.ListViewElement.ViewElement.Scroller.Scrollbar.FirstButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
    this.radListView1.ListViewElement.ViewElement.Scroller.Scrollbar.SecondButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
    this.radListView1.ListViewElement.ViewElement.Scroller.Scrollbar.ThumbElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
    this.radListView1.ListViewElement.ViewElement.Scroller.Scrollbar.FillElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
    this.radListView1.ListViewElement.ViewElement.Scroller.Scrollbar.Children[1].Visibility = Telerik.WinControls.ElementVisibility.Hidden;
    this.radListView1.ListViewElement.ViewElement.Scroller.Scrollbar.BorderElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;

    I have also updated your Telerik Points for bringing this issue to our attention.

    Should you have further questions, I would be glad to help.

    Regards,
    Ivan Petrov
    Telerik
    RadChart for WinForms is obsolete. Now what?
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Bekir
    Bekir avatar
    16 posts
    Member since:
    Sep 2010

    Posted 10 Jun 2013 Link to this post

    Thank you...
  5. Sherlock
    Sherlock avatar
    17 posts
    Member since:
    Oct 2013

    Posted 18 Nov 2013 Link to this post

    Hi Telerik !

    I did as you explained.
    But only vertical scrollbar takes these affects.
    I mean just vertical scrollbar will be hidden, and nothing happens to horizontal scrollbar.
    Would you please help?
  6. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 21 Nov 2013 Link to this post

    Hi Sherlock,

    Thank you for writing.

    To hide the horizontal scroll bar you have to Apply the same code as the one for the vertical scroll bar:
    RadScrollBarElement vScrollbar = radListView1.ListViewElement.ViewElement.Scroller.Scrollbar;
    RadScrollBarElement hScrollbar = ((DetailListViewElement)radListView1.ListViewElement.ViewElement).ColumnScroller.Scrollbar;
    this.HideScrollBarElements(vScrollbar);
    this.HideScrollBarElements(hScrollbar);
     
    private void HideScrollBarElements(RadScrollBarElement scrollbar)
    {
        scrollbar.MaxSize = new Size(1, 1);
        scrollbar.FirstButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
        scrollbar.FillElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
        scrollbar.Children[1].Visibility = Telerik.WinControls.ElementVisibility.Hidden;
        scrollbar.SecondButton.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
        scrollbar.ThumbElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
        scrollbar.BorderElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
    }

    I hope this will be useful. Feel free to write back with further questions.

    Regards,
    Ivan Petrov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  7. Sherlock
    Sherlock avatar
    17 posts
    Member since:
    Oct 2013

    Posted 21 Nov 2013 Link to this post

    Thanks Telerik
    But I don't need to hide everything

    I just want to hide left button and right button of horizontal scrollbar
    Also I need to remove its thumbnail picture. Or if is it possible, change it with another pic.

    Please do a favor and also let me know how to change back color of horizontal scrollbar.




    I should add that there isn't "ColumnScroller" after dot !
              radListView1.ListViewElement.ViewElement.ColumnScroller.Scrollbar

    Thanks.
  8. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 26 Nov 2013 Link to this post

    Hello Sherlock,

    Thank you for writing.

    The code from my previous post hides all the elements of the scrollbar one by one. If you do not want to hide a certain element you can remove/comment the line of code that hides it. As to the ColumnScroller property you should note that there is a cast before it:
    RadScrollBarElement hScrollbar = (DetailListViewElement)radListView1.ListViewElement.ViewElement).ColumnScroller.Scrollbar;

    I hope this helps. Feel free to write back with further questions.

    Regards,
    Ivan Petrov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  9. Sherlock
    Sherlock avatar
    17 posts
    Member since:
    Oct 2013

    Posted 26 Nov 2013 Link to this post

    I copy/paste the code in C# and visual studio, gives me error on this line.
    Would you please write a full code to hide left button of horizotal scrollbar and changing back color of it?
    Please write this full code in VB.NET if you don't mind.
    Thanks.
  10. Ivan Petrov
    Admin
    Ivan Petrov avatar
    701 posts

    Posted 29 Nov 2013 Link to this post

    Hello Sherlock,

    Thank you for writing back.

    Here is the code in VB.NET:
    Dim hScrollbar As RadScrollBarElement = DirectCast(radListView1.ListViewElement.ViewElement, DetailListViewElement).ColumnScroller.Scrollbar

    For the BackColor of the scrollbar you can set the following property:
    Dim hScrollbar As RadScrollBarElement = InlineAssignHelper(DirectCast(radListView1.ListViewElement.ViewElement, DetailListViewElement).ColumnScroller.Scrollbar.FillElement.BackColor, Color.Red)

    I hope this helps.

    Regards,
    Ivan Petrov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready