{{tag>category:"presentation server" }} ====== Up-Down controls ====== === Published 25 MAY 2013 at 03:57:45PM === The Up-Down control is a Windows Common Control that is basically a simplified scrollbar used to increment and decrement values such as a scroll position or numeric values in a linked control (a.k.a the "buddy" control). [caption id="attachment_874" align="aligncenter" width="263"][[http://revdevx.files.wordpress.com/2013/04/ud.png|{{16582.6651041667_1.png}}]] Up-Down control with an EditLine buddy (i.e. a "spin-control")[/caption] It supports the following properties: * **ALIGN** * **ARROWKEYS** * **AUTOUPDATEBUDDY** * **BUDDY** * **HEXADECIMAL** * **HORIZONTAL** * **HOTTRACK** * **INCREMENT** * **RANGE** * **SHOWTHOUSANDS** * **VALUE** * **WRAP** And the following events: * **GOTFOCUS** * **HSCROLL** * **LOSTFOCUS** * **VSCROLL** ==== ALIGN property ==== This property controls the position of the Up-Down control relative to its buddy control. It can be one of the following values: * Null (empty) * "L" - left * "R" - right If set to "R" the control positions itself to the right of its buddy control as per the image above (the width of the buddy control is shortened automatically to accommodate this).  If set to "L" the Up-Down control is positioned to the left instead, and the buddy control is re-sized and re-positioned accordingly. ==== ARROWKEYS property ==== This is a boolean property. Setting it to TRUE ("1") causes the //buddy// control to respond to the Up and Down arrow keys to increment and decrement the **VALUE** of the Up-Down control. ==== AUTOUPDATEBUDDY property ==== This is a boolean property. Setting it to TRUE ("1") causes the Up-Down control to set the text of its buddy control when it's own **VALUE** property changes. ==== BUDDY property ==== This property specifies the fully-qualified name of a control (usually an EDITLINE) to associate with the Up-Down control (i.e. it sets the "buddy control"). ==== HEXADECIMAL property ==== This is a boolean property. Setting it to TRUE ("1") causes the Up-Down control to update its buddy control with a hexadecimal string rather than a decimal one. ==== HORIZONTAL property ==== This is a boolean property. Setting it to TRUE ("1") causes the Up-Down control to render it's arrows left and right rather than up and down. ==== HOTTRACK property ==== This a boolean property, Setting it to TRUE ("1") causes the arrows on the Up-Down control to be highlighted as the mouse passes over them. ==== INCREMENT property ==== This property specifies the amount by which the **VALUE** changes when the buttons are clicked.  By default this property is "1". ==== RANGE property ==== This property is an @fm-delimited array of two integers containing the lower and upper limits of the Up-Down control. <1> Low limit <2> High Limit The **VALUE** property must be between these two values. ==== SHOWTHOUSANDS property ==== This a boolean property, Setting it to TRUE ("1") shows a "thousands-separator" (a comma) for every three decimal digits when displaying the **VALUE** in a buddy control. ==== VALUE property ==== This property specifies the current position of the Up-Down control. ==== WRAP property ==== This a boolean property, Setting it to TRUE ("1") causes the **VALUE** to "wrap" if it is incremented or decremented beyond its **RANGE**. **Further reading** More information on the Up-Down control can be found on the MSDN site [[http://msdn.microsoft.com/en-us/library/windows/desktop/bb759889(v=vs.85).aspx|here]], //(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).// === Comments === == Original ID: revdevx.wordpress.com/?p=871 ==