Skip to content

Show scroll bar only on hover

New Discussion
Stephan Edwards
Stephan Edwards asked on Dec 16, 2019 12:04 PM

I would like to only show the scroll bars on hover of a grid, a tree and so on. Is this possible?

Sign In to post a reply

Replies

  • 0
    Teodosia Hristodorova
    Teodosia Hristodorova answered on Dec 16, 2019 12:04 PM
    Hello Stephan,
    I have been looking into your question and I determined that the behavior you are looking for can be achieved. Since there are differences in the controls implementation and properties, this will require a separate approach for each control. However, the logic will be similar. 
    By design when the data is too big to fit in the visible space the scrollbars will appear, so first, when the data is bound to the control they have to be set to not showing manually.
    The events that will show and hide the scrollbars on hover are MouseHover and MouseLeave. For example, if the control is UltraGrid :

    public Form1()
            {
                InitializeComponent();
                ultraGrid1.DisplayLayout.Scrollbars = Infragistics.Win.UltraWinGrid.Scrollbars.None;
            }
     private void ultraGrid1_MouseHover(object sender, EventArgs e)
            {
                ultraGrid1.DisplayLayout.Scrollbars = Infragistics.Win.UltraWinGrid.Scrollbars.Both;
            }
     
            private void ultraGrid1_MouseLeave(object sender, EventArgs e)
            {
                ultraGrid1.DisplayLayout.Scrollbars = Infragistics.Win.UltraWinGrid.Scrollbars.None;
            }


    If the control is UltraTree the property that has to be set is called Scrollable and about the possible values could be found here.
    A sample application that demonstrates how such a behavior could be achieved for UltraTree and UltraGrid could be found in this link. The logic for other controls has to be similar. 
    If you require any further assistance or questions on the matter, please let me know.
    Sincerely,
    Teodosia Hristodorova
    Associate Software Developer
  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Stephan Edwards
Favorites
0
Replies
1
Created On
Dec 16, 2019
Last Post
6 years, 2 months ago

Suggested Discussions

Created by

Created on

Dec 16, 2019 12:04 PM

Last activity on

Feb 11, 2026 11:26 AM