third_party_content:community:commentary:revdevx:16582.6651041667

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"] 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

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.

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.

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.

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").

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.

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.

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.

This property specifies the amount by which the VALUE changes when the buttons are clicked.  By default this property is "1".

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.

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.

This property specifies the current position of the Up-Down control.

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 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
  • third_party_content/community/commentary/revdevx/16582.6651041667.txt
  • Last modified: 2024/01/29 20:23
  • by 127.0.0.1