{"id":459,"date":"2010-12-21T21:09:50","date_gmt":"2010-12-21T21:09:50","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=459"},"modified":"2026-06-17T09:25:28","modified_gmt":"2026-06-17T08:25:28","slug":"scroll-bars","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/scroll-bars\/scroll-bars","title":{"rendered":"Scroll Bars"},"content":{"rendered":"<h4>\nEvent When A Change Is Complete<br \/>\n<\/h4>\n<p>\nUse MouseCaptureChanged event with this\n<\/p>\n<pre>\r\n<code>\r\n\tif (!srlTimeline-&gt;Capture)\t\t\/\/Don&#39;t do if scroll bar is being dragged (only do if this is the release event)\r\n\t{\r\n<\/code><\/pre>\n<h4>\nScroll Event<br \/>\n<\/h4>\n<p>\nThis is a general event that is triggered for many things, such as&nbsp;the scroll bar is moved to a new position. &nbsp;Use its arguments to drill down into getting particular events.\n<\/p>\n<pre>\r\n<code>\r\n\tprivate: System::Void srlTimeline_Scroll(System::Object^  sender, System::Windows::Forms::ScrollEventArgs^ e)\r\n\t{\r\n\t\tif (e-&gt;Type = ScrollEventType::EndScroll)\r\n\t\t{\r\n\t\t\tMessageBox.Show(&quot;User has finished scrolling&quot;)\r\n\t\t}\r\n\t}\r\n<\/code><\/pre>\n<p>\nScrollEventArgs\n<\/p>\n<p style=\"margin-left: 40px;\">\nEndScroll&nbsp;&nbsp; &nbsp;The scroll box has stopped moving.<br \/>\nFirst&nbsp;&nbsp; &nbsp;The scroll box was moved to the Minimum position.<br \/>\nLargeDecrement&nbsp;&nbsp; &nbsp;The scroll box moved a large distance. The user clicked the scroll bar to the left(horizontal) or above(vertical) the scroll box, or pressed the PAGE UP key.<br \/>\nLargeIncrement&nbsp;&nbsp; &nbsp;The scroll box moved a large distance. The user clicked the scroll bar to the right(horizontal) or below(vertical) the scroll box, or pressed the PAGE DOWN key.<br \/>\nLast&nbsp;&nbsp; &nbsp;The scroll box was moved to the Maximum position.<br \/>\nSmallDecrement&nbsp;&nbsp; &nbsp;The scroll box was moved a small distance. The user clicked the left(horizontal) or top(vertical) scroll arrow, or pressed the UP ARROW key.<br \/>\nSmallIncrement&nbsp;&nbsp; &nbsp;The scroll box was moved a small distance. The user clicked the right(horizontal) or bottom(vertical) scroll arrow, or pressed the DOWN ARROW key.<br \/>\nThumbPosition&nbsp;&nbsp; &nbsp;The scroll box was moved.<br \/>\nThumbTrack&nbsp;&nbsp; &nbsp;The scroll box is currently being moved.\n<\/p>\n<h4>\nValue Changed Event<br \/>\n<\/h4>\n<p>\nOccurs every time the value changes (either by user or when you set the value)\n<\/p>\n<h4>\nIs a Scroll Bar Currently Being Dragged With The Mouse<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\tif (!srlTimeline-&gt;Capture)\t\t\/\/Don&#39;t do if scroll bar is being dragged\r\n<\/code><\/pre>\n<h4>\nThe Maximum Value Can&#39;t Be Reached!<br \/>\n<\/h4>\n<p>\nThe maximum value of a scroll bar can only be reached programmatically. The value of a scroll bar cannot reach its maximum value through user interaction at run time. The maximum value that can be reached through user interaction is equal to 1 plus the Maximum property value minus the LargeChange property value. So an easy way round this is to set the maximum to (Max Value + Large Change Value &#8211; 1)\n<\/p>\n<pre>\r\n<code>\r\n\tMyScrollBar-&gt;Maximum = MyMaxValue + ChartScrollBar-&gt;LargeChange - 1<font face=\"Century Gothic, Arial, Helvetica, sans-serif\"><span style=\"font-size: 6px; white-space: normal;\">\r\n<\/span><\/font><\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Event When A Change Is Complete Use MouseCaptureChanged event with this if (!srlTimeline-&gt;Capture) \/\/Don&#39;t do if scroll bar is being dragged (only do if this is the release event) { Scroll Event This is a general event that is triggered for many things, such as&nbsp;the scroll bar is moved to a new position. &nbsp;Use its [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[59],"tags":[],"class_list":["post-459","post","type-post","status-publish","format-standard","hentry","category-scroll-bars"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/comments?post=459"}],"version-history":[{"count":5,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/459\/revisions"}],"predecessor-version":[{"id":950,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/459\/revisions\/950"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=459"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}