Click here to Skip to main content
15,892,537 members
Everything / Scrollbar

Scrollbar

Scrollbar

Great Reads

by InvisibleMedia
ScrollBars implementation with Windows Forms because the AutoScroll didn't fit my needs
by Praveen Meghwal
This article explains how to implement on-scroll loading data from the server using jQuery as seen on Facebook.
by After2050
This article demonstrates the steps in creating a simple jQuery plug-in with a sample called Map Scroller.
by sieunhantanbao
Show more data when window scrolling down like Facebook, Twitter...

Latest Articles

by InvisibleMedia
ScrollBars implementation with Windows Forms because the AutoScroll didn't fit my needs
by Peter Huber SG
Deep dive into the intricacies of combining scrolling and zooming in your control
by Amogh Natu
This tip shows how you can add scrolling to a view in iOS to allow multiple elements on the screen that won't fit in one screen.
by sieunhantanbao
Show more data when window scrolling down like Facebook, Twitter...

All Articles

Sort by Score

Scrollbar 

11 Sep 2014 by Matt T Heffron
The TimeSpan struct is your friend!Just create a new TimeSpan from the count in seconds, and use its .ToString(formatString) to format it:TimeSpan elapsed = TimeSpan.FromSeconds(elapsedTimeSecondsCounter);string elapsedFormatted = elapsed.ToString(@"m\:ss");
25 Aug 2023 by InvisibleMedia
ScrollBars implementation with Windows Forms because the AutoScroll didn't fit my needs
4 Apr 2014 by Sergey Alexandrovich Kryukov
I cannot imagine that a user can possibly scroll beyond its range. This control is designed to keep the scroll position inside some range. It is set by the call to the function...
14 Sep 2014 by Sergey Alexandrovich Kryukov
The problem is not so simple; and I don't think it can be solved without looking at the site you are trying to scrape. I have no idea how exactly the lazy loading technique you described is implemented, but I'm sure it can be implemented is some different ways, and those differences would need...
18 Apr 2011 by #realJSOP
Microsoft makes the default styles available in a download, and are based on the selected windows theme.http://code.msdn.microsoft.com/wpfsamples#themes[^]Or you can find a 3rd party tool like Style Snooper[^].Google reveals all.
25 Jul 2012 by Jochen Arndt
You retrieve the mouse position relative to client rect of your window. If you need the position relative to your document (drawing), you must adjust the position by the scrolled range. CScrollView::GetScrollPosition() will give you the document coordinates of the upper left corner that can be...
22 Oct 2012 by Sergey Alexandrovich Kryukov
The "focus" always means "keyboard focus" and nothing else. You need to make your control focusable. Please see:http://msdn.microsoft.com/en-us/library/system.windows.forms.control.canfocus.aspx[^].You should not use PictureBox for your purpose. More exactly, in principle, this is...
31 Oct 2012 by Sergey Alexandrovich Kryukov
You can use the features of the System.Windows.Forms.ScrollableControl. The class is a base class for System.Windows.Forms.ContainerControl, and this one is the base class for System.Windows.Forms.Form, so you can do it with your form.But better yet, create some control class derived from...
6 Dec 2012 by RainLover
Sample form:* {font:13px arial; color:white;}body {background:black;}label {display:inline-block; width:50px;}input, textarea {margin:0; border:1px solid red; padding:0; background:green;}textarea {width:300px;...
14 May 2013 by Yuriy Loginov
put your buttons inside the System.Windows.Forms.Panel and set AutoScroll = truemore info here:Customize a panel with Autoscroll property[^]
8 Jun 2017 by Richard Deeming
Firefox doesn't support custom scrollbar colours. There's a request to add this that's been open for 16 years, with no sign of a resolution: 77790 - (scrollbar-colors) Style the scrollbar (binding ::-moz-horizontal-scrollbar to XBL)[^] If you really need to style the scrollbars, then you're...
16 Aug 2021 by RickZeeland
Take a look at this CodeProject article: Custom Drawn Scrollbar[^]
18 Apr 2011 by cesarin
Anybody knows a good software that describes (or shows) all the XAML code of the common WPF controls?I'm using VS2010 Express Edition and I want to change the position of the scrollbar (and the scrollbar buttons) at the bottom of a listview control instead of the right side. I really like to...
25 Apr 2011 by Sandeep Mewara
Why are you reposting[^] the same thing again and again. Keep patience and wait for someone to look at. Posting again and again is rude.
28 Jul 2011 by EriBeh
Hello,I want to style a vertical scrollbar for my textbox.I am NOT allowed to add/use a style that is automatically used for all textboxes, or scrollviewers, because I am not allowed to override anything common.So I need a style with a key/name I can use for each textbox (or...
9 Oct 2011 by DaveAuld
I have done some testing, and have found that MouseDown does fire, but MouseUp does not when the scroll bar is used. Don't know if this is a bug in Jquery/Javascript or by design so need to find a work around. The best option i came up with is to disable the autoscroll on a MouseDown, but then...
24 Oct 2011 by Trekstuff
Using "window.scrollTo" or assigning "element.scrollLeft" is very fast, almost invisible in in IE8, but noticeable jerky in IE9. Tried turned off GPU acceleration and smooth scrolling - no luck.
24 Oct 2011 by Sergey Alexandrovich Kryukov
IE gets bloated like nearly everything else; who can help it?—SA
30 Nov 2011 by Freeboss
I am dragging an Image from a Listbox into an ItemsControl which lies inside a ScrollViewer.The DragDrop is my own Implementation and not the ordinar DragDrop class, allowing me to capture the scrollwheel while dragging.However when i scroll i want the ItemsControl to scroll and not...
30 Nov 2011 by Freeboss
Second time in a row i post a question and find the answer within an hour..I used VisualTreeHelper.GetChild(DependencyObject reference, int childIndex) to find access the visual tree and get a reference to the scrollviewer which was inside an .Then using LineUp() or LineDown() had the...
12 Jun 2012 by Abey Kuruvila
Hi.Got an issue with ScrollBar on my Custom DataGridView.I've inserted the custom DGV on a tabcontrol-tabpage and filled it with rows and performed my custom formatting on it.But when I switch between tabs and return back to the original tab, the scroll bars go...
12 Jun 2012 by Abey Kuruvila
OK...I found out the cause for this.Since I was implementing multiple row clicks (i.e. 3 rows being selected on one row click), I was using the clearselection() method to clear the previous selections.The problem now lies with the clearselection() method that causes the scroll bars to get...
20 Jun 2012 by NeonMika
Hello!So here is my code:
21 Jun 2012 by NeonMika
Thanks to johannesnestler for this solution:>>Ah, now I see you could just change the order of the docking so that LastChildFill uses the ScrollViewer, then you don't have to set the Dock property.
25 Jul 2012 by nbtthief
I'm trying to design a paint program, now i need to use scrollbar. I derived CScrollView. The problem is when i scroll, the coordinates is not what i think.For Example:I set SetScrollViews(MM_TEXT, 1000x1000) -> when my app is fullscreen (scrollbar disappear), so when i move my mouse to...
16 Sep 2012 by Jesse Chisholm
Here is an external link to an article that talks about fixing the first N columns[^].It does happen to use a DataGridView in the Grid, which you said you didn't really want to use, though you didn't say why you didn't.This external article uses xamGrid by Infragistics[^] for the same...
24 Oct 2012 by user_code
Hello,I have a user control, which is scrollable control, and I want to change its autoscrollposition (only the X value).I'm doing it like this:int newScrollX = myFunction();Point p = new Point(newScrollX, this.AutoScrollPosition.Y);this.AutoScrollPosition = p;newScrollX gets...
9 Dec 2012 by Webdevelopr
These same codes of you * {font:13px arial; color:white;}body {background:black;}label {display:inline-block; width:50px;}input, textarea {margin:0px; border:1px solid red; padding:0px; background:green;}#parent {width:284px; overflow:hidden;}textarea {width:300px; height:100px;...
31 Jan 2013 by Kieran Crown
I have a project with a somewhat custom interface but have yet to find a custom scroll bar control that looks and works well, I have found this code online which does work with and track bar which is good because there are plenty of nice looking customizable track bar controls out there. The...
6 Feb 2013 by y3ec255
I am implementing a resizable dialog with scrollbars.I write code for horizontal and vertical scroll bar code in OnSize function and scrollbar events are captured in OnVScroll and OnHScroll functions.When i scroll(vertical Scrollbar) the dialog to two stpes and maximized the window then...
12 Feb 2013 by vinothezhilan m
I have a datagrid (wpftoolkit v3.5.40128.1).can any one suggest me how to get ride of this problem....if vertical scroll bar is visible the last column of a data grid is moved left to a size of scroll bar column.I need my last column header overlaps the vertical scroll bar.pls give me...
1 Mar 2013 by Kaizen202
I am trying to customize default windows scrollbar in combobox like below.public partial class ComboEx : ComboBox{ internal ScrollbarEx vScrollBar; NativeListWindow listControl; public ComboEx() { InitializeComponent(); DropDownHeight = 100; ...
3 Mar 2013 by vinothezhilan m
By editing the default template of the datagrid this problem can be solved.
3 Mar 2013 by vinothezhilan m
By editing the default template of the datagrid this problem can be solved.http://msdn.microsoft.com/en-us/library/cc278066(v=vs.95).aspx[^]use the datagrid default template from above link.find "VerticalScrollbar" is scrollbar.you should alter the grid.column = 2 to grid.column =...
14 Mar 2013 by Shubham Choudhary
Hi!!! Use like this TOP and use this css.fk-ui-goTop {color: #fff;background: #b9b8b9;color: #fff;padding: 6px 5px...
14 Mar 2013 by Karthik Harve
Hi,the below article will give complete solution and various options to achieve "Back To Top" facility along with source and demo.11 Top jQuery Scroll to Top of Page Plugin Tutorials with Examples[^]you can see two buttons in the article "Source" - for source code, "Demo" - for...
11 May 2013 by Mir Shakeel Hussain
ontick not gets called when i include this code in my project but it works when i made an indiviual file for this amount of code $('.SearchContent5').each(function(i) { var position = $(this).position(); console.log(position); console.log('min: ' + position.top + '...
14 May 2013 by ayesha hassan
I have created a window and added almost 50 buttons to it. But the problem is that I can only see a few of those buttons as my window does not scroll up/down or left/right to show me the remaining buttons.If my window is an edit box, I can easily add AutoScroll to it i.e. as soon as the text...
15 May 2013 by ayesha hassan
I have created a Window and then, created 50 buttons on this Window but I can only see 10 buttons on my window. Rest are out of view since I am not able to scroll the window down.I have added auto scroll to window by addingWS_VSCROLL | WS_HSCROLL | ES_AUTOVSCROLL | ES_AUTOHSCROLLto ...
15 May 2013 by H.Brydon
The phrase "auto scroll" does not make sense in this context. It is not clear if you are doing this with a dialog or a form. If it is a dialog, there is no scrolling. If a form, then scrolling is built in (actually you have to do a few things to remove it). It sounds like you are...
30 May 2013 by Utkatsh Patnaik
Basically, I have two Telerik Grids. Now, I have a checkbox to synchronize the horizontal scroll bar in both the grids and want to disable the synchronization when the checkbox is unchecked. Now, the problem is that as soon as I disable the checkbox i.e. the unbind function is executed, the...
22 Jul 2013 by Destiny777
Here's what I came up with to get this to do what I wanted... However there are 2 sets of scrollbars... The one for the Panel at 17 pixels and the ones that I designed at 40 pixels.While not perfect, this methodology seems to work!---Public Class Form1 Inherits...
26 Jul 2013 by kk2014
hi,when my pop up box displays then vertical and horizontal scroll bars appears.how to remove them?thanks
26 Jul 2013 by TrushnaK
Add this in your pop-up's css overflow-y:hiddenoverflow-x:hidden
30 Aug 2013 by Member 10197289
hello everybody:i just want to ownerdraw a scrollbar . but when i use SCROLLBARINFO this struct to get scrollbar infomation,but i can't get correct value,can u tell me what wrong with that. void MyScrollBar::OnPaint() { SCROLLBARINFO...
30 Aug 2013 by Member 10197289
anybody can help me!!!!!i am going dead !!!!!!
21 Oct 2013 by Rieth L
I need a scrollbar (horizontal and vertical) in a panel, without autoscroll because i want that panel starts with the scrollbar displayed and have a max and min value... Using WinForms
7 Nov 2013 by Bhawna Deshmukh
In my wpf application datagrid sorting works perfectly when my scroll is up but when i down my scroll my sorting not works till it comes the top .
10 Nov 2013 by Bhawna Deshmukh
I was facing this issue because of drag and drop datagrid items I added following code in PreviewMouseLeftButtonDown and Drop events of datagridDataGrid grd = e.Source as DataGrid; if (grd == null) return; //make sure the row under the grid is...
19 Nov 2013 by Robert Murray
I need help adding a ScrollViewer to a list on controls added at run time. With up to 50 rules being added in the code behind the top position on the canvas exceeds its design time size, and a scrolling view of the rules is necessaryI am adding a number of controls to a canvas at run time. ...
25 Nov 2013 by JayantaChatterjee
Hi,I'm creating a quiz application in C#(winform),so I need add scrollBar in Radio Button(if text is overflow in radioButton, the scrollBar will appear on radio button).I searched but never find any suggestion on this..I'm using radio button as option so I need to stick on radio button...
12 Dec 2013 by Member 8525993
Can someone tell me how to hide the horizontal scroll bar for listview and keep the vertical one? I am not even sure this is possible. I know you can hide both but i just want to hide the one. Thanks i am using vb.net win form
12 Dec 2013 by Maciej Los
Have a look here:C# ListView Disable Horizontal Scrollbar[^]Hide horizontal scrollbar in listview?[^]
12 Feb 2014 by ShaHam11
Hi I have a web appliation where my treeview is placed in master page and it has about 15 child pages. I just wanted to hide the scroll bars (note not hide the treeview) only in index page (child page)
4 Apr 2014 by AlwaysLearningNewStuff
I have a treeview control that I must subclass.One of the things I must do is to handle WM_MOUSEWHEEL, WM_HSCROLL and WM_VSCROLL properly, by discarding these messages if the user scrolls beyond the scrollbar range.I have tried using GetScrollInfo like this:case WM_MOUSEWHEEL: {...
28 Apr 2014 by Nishant Nawarkhede
I am using jquery.momentum.js for an application on which i am working.I have noticed that the scroll bar used for displaying events on webpage is suddenly begin jerking up and down in small motions very quickly when I touch and move mouse pointer up side or down side.I have tried to...
28 Apr 2014 by Sharath.Mitte
may its a duplicate question what am asking but i want proper solution..I have a child page with the nested master means 2 master pages inherit one from another..and in that child page i have all user controls only..so in my case i have maintain scroll position of child page after async...
25 May 2014 by Tracy Chong
Hello, I need some help.Currently, I have a gridview that will update with the timer and also a button when clicked, will update the gridview.So now, I am currently facing a problem regarding when scrolling the updatepanel/gridview, I would like it to remain at scrollbar position. But...
25 May 2014 by Debabrata_Das
Just wondering if you have already tried by adding MaintainScrollPositionOnPostback="true" in Page tag.
26 Jul 2014 by ilostmyid2
i found the reason: i had to change class name of my view from Static to Message when creating it.
11 Sep 2014 by _Q12_
I have a video player that I want to build. i have a horizontal scroll bar lenghtMovieLoaded = video.Duration; //(Retrieves the length, in seconds, of the video file.)hScrollBar1.Maximum = (int)Math.Round(lenghtMovieLoaded); //maximum of scrollbarLets say, my video.Duration is 1000...
13 Sep 2014 by yno1
Im trying to create a little script that will grab photos from a specific site ("ilike-photo.com") and save them in google-drive. but this site uses a thing called lazy-loading- more images are dynamically loaded when the user scrolls down. one way to work around this is using window.scroll()...
29 Oct 2014 by Vukasin Vulovic
Hey guys,so,I have a button,when clicked,it opens menu with options,and when i click on some other button in that menu,it gives me another menu. I need to put a scroll bar in JPopupMenu since I have many items. Here is code. final JPopupMenu balasevicM = new JPopupMenu(""); ...
11 Dec 2014 by Member 11107452
HelloWe have an custom charting implementation using the mschart api 3.5. Everything works great with the exception of the scrollbar. We have our own implementation of a google maps type mouse zoom and drag and it works great.Problem is, You cannot properly drag using the scrollbar and...
6 Jun 2016 by Member 10235977
I have a gridview on my webpage nested in a div. The gridview has a template field containing a LinkButton. On click of LinkButton, RowCommand gets fired and some code is executed and there is a postback. I want the focus on same row in which LinkButton was clicked so that user can readily have...
21 May 2015 by EriBeh
Is there any way to Switch the scrollbar style if there are tocuh devices attached or is there any way to use my solution but without "Inherits" for the property?Or can anybody tell me if my solution causes Performance Problems or not and how to find those?Thanks a lot!Eric
17 Aug 2015 by Jip2Lay
I have a GridView with 10 rows that can be updated new rows by users. In the GridView I show only 3 rows and vertical scrollbar.After a user selects any row on the GridView (the postback occurs), I want to scroll it to the selected row.How can I do this?Thanks in advance.
18 Sep 2015 by Member 11994931
Hello ! I want to scroll a Horizontal Scroll Bar ( HScollbar) witch should scroll the content of a Panel via scrolling a DataGridView horizontally . - The layout of the panel controls is the same as the layout of my DataGridView : See my Panel content as my DataGridView Content .-...
16 Nov 2015 by Sergey Alexandrovich Kryukov
It's not clear what the problems is. You can always any available control, including ScrollBar: https://msdn.microsoft.com/en-us/library/system.windows.forms.scrollbar%28v=vs.110%29.aspx[^].However, it's much more likely that you need a scroll bar already bound to some control behavior and...
25 Nov 2015 by ANSHUL JAIN
Dear All,I have a requirement wherein I have a ListView with 7 columns. By default, column 5,6,7 are not visible and require me to use the Horizontal Scroll BAr to scroll towards right. Is there a way by which my scroll bar can move towards right by default when the ListView is loaded?
7 Dec 2015 by Dave Kreskowiak
You can't. The only way to see the rest of the table is to resize the container your TLP is in to show the content you need to see.If AutoScroll is set to True on any of the controls that support it, scrolling in the designer works.The TableLayoutPanel is not really a control. It's an...
4 Jan 2016 by Member 12243650
Having trouble with a overflow y scroll on this page in safari:http://www.lizzygee.co.uk/product/classic/If you go to the details tab and click a link further down the page and go to a different page, when you press the back button to return to the product page again the overflow-y...
14 Mar 2016 by ngthtra
Hi All,I have a problem about displayed scroll bar on Surface PC.My grid is set allay display vertical scroll bar.gridProductlist { overflow-y: scroll !important;}It run OK on IE of PC but when run on Surface PC(OS: Window8), my grid don't show scroll bar.I debugged and see...
6 Jun 2016 by Pratiik Miistry
Scroll Gridview while Maintaining Scroll Position[^]
20 Apr 2017 by Mahesh Alappuzha
hi, i have window with a collection of user control , these user control can drag in the window. my scenario is add 2 user control maximize window one of the user control drag into bottom right position minimize the window then the only one user control is showing and there is no...
11 Jul 2017 by ThabetMicrosoft
I created a Scroll bar at the bottom of the window, to scroll a simple text written manually, it works well But I want to scroll a list of items from my database, I do the binding to an ObservableCollection.. but I don't have the return of my ItemSource... I have the return : (Collection)...
6 Mar 2018 by mansouri_elnaz
please check this link: Issue with Telerik Grid Horizontal Scroll bar - Stack Overflow[^]
6 May 2018 by Wendelius
One way is to call ShowScrollBar directly from user32.dll. Have a look at Problem to hide vertical scrollbar in panel control.[^]
6 May 2018 by Alan N
The general solution to this problem requires nested panels. The inner panel is allowed to resize to fit it's contents and does not show scrollbars. The outer panel has AutoSize false and AutoScroll false. By changing the location of the inner panel it may be moved (scrolled) within the outer...
28 May 2018 by Member 13801581
i have two ListBoxAdv1 and ListBoxAdv2 and i want sync them scroll i used this code and just shown scrolled up or down but didn't update screen and items in another ListBoxAdv what should i do? please help What I have tried: i try this: private void listBoxAdv1_Scroll(object sender,...
28 May 2018 by Member 13801581
thanks for many response! i find solution: bool Scrolling = true; private void listBoxAdv1_Scroll(object sender, ScrollEventArgs e) { if (Scrolling == true) { Scrolling = false; listBoxAdv2.BeginUpdate(); ...
9 Dec 2018 by Member 14007122
1. I was made List box in form 2. but I wanna enlarge width of Scroll Bar. So, Customize a new Scroll Bar using VScroll bar in 'Tool Box' 3. but I don't know Combine VScroll Bar with List box and How do I scroll down List box I was made... 4. I think.. Using Event " .Scroll += new...
9 Dec 2018 by TABiSH777
Hi, please try changing the scroll viewer in the control template of Listbox. please check this Link. In the question itself user has tried implementing that.
20 Nov 2019 by Eddi Rae
I have a gridview that is over 20 columns. I am trying to get the header to not scrollable. Below is my current code. ...
20 Nov 2019 by Mehul M Thakkar
Gridview will be converted in html table at the time of rendering. You can use some css for that. Here are some samples Position Sticky and Table Headers | CSS-Tricks[^] https://codepen.io/tjvantoll/pen/JEKIu[^]
24 Sep 2020 by Richard MacCutchan
See ScrollMagic Documentation[^].
30 Apr 2021 by theskiguy
So I have a unique situation. I have a lot of old WinForms projects written in VS2005 that I have been upgrading to VS2015. I have been doing this on a Win 7 WS but I also have a Win 10 WS that i'm migrating to. So my apps have a lot of...
16 Aug 2021 by strangerick
Hello! I'm making a simple UI system for a small game that is going to be made using Windows Forms and drawn on a PictureBox. At the moment, i'm having some difficulty to implement a Scrollbar and need some help to solve two major problems as...
16 Aug 2021 by OriginalGriff
Why are you reinventing the wheel? .NET has loads of controls that add toolbars as needed, as well as providing the ScrollBar Class (System.Windows.Forms) | Microsoft Docs[^] as a stand alone scrollbar ...
1 Dec 2021 by #realJSOP
Looks to me like the gridview is taller than the window. Your problem is only indirectly related to the grid being filled.
7 Feb 2022 by CHill60
There are some articles here on CP that can guide you into building your own Custom Control WinForms Custom Container Control[^] Writing Your Custom Control: Step by Step[^] There is also this article...
6 May 2018 by Member 13814072
Hey On my form, I have a panel with a varying number of buttons. They are all placed in a row and are all set to dock top. Since I dislike the design of the included scrollbars and the lack of possibility to change the color, I created my own scrollbar, which works great. The problem is that in...
26 Apr 2012 by Praveen Meghwal
This article explains how to implement on-scroll loading data from the server using jQuery as seen on Facebook.
26 Sep 2010 by After2050
This article demonstrates the steps in creating a simple jQuery plug-in with a sample called Map Scroller.
21 Feb 2014 by sieunhantanbao
Show more data when window scrolling down like Facebook, Twitter...
21 Oct 2013 by BillWoodruff
If what you are asking is how do you force scrollbars to appear when a Panel Control in WinForms does not have "content" in it that would force scroll-bars to appear if its 'AutoScroll Property was 'true:Set the Width and Height values of the 'AutoScrollMinSize Property of the Panel greater...
4 Oct 2010 by chaitanya venneti
The Silverlight wrap panel is a great control which automatically wraps the elements in it either horizontally or vertically as required to fit them within the size of the panel. This short article explains how to enable a scrollviewer for the wrap panel content.
31 Oct 2012 by BC @ CV
Use a panel. Then add your pictureBoxes to the panel. Make sure you set AutoScroll = true.public class Form1 : Form { private System.ComponentModel.IContainer components = null; private System.Windows.Forms.Panel panel1; private string _dir = @"C:\img"; ...
6 May 2014 by Amogh Natu
This tip shows how you can add scrolling to a view in iOS to allow multiple elements on the screen that won't fit in one screen.