Sets or returns information determining the connection with a buddy control.
UpDown.BuddyControl [ = Ocx ]
UpDown.LeftAlign [ = Boolean ]
UpDown.Horizontal [ = Boolean ]
An UpDown control has a pair of arrow buttons which the user can click to increment or decrement a value, such as a scroll position or a value in an associated control, known as a buddy control.
To the user, an UpDown control and its buddy control often look like a single control. The buddy control can be any control that can be linked to the UpDown control through the BuddyControl property, and usually displays data, such as a TextBox control or a Command control.
The UpDown control can be positioned to the right (default) or left of its buddy control with the LeftAlign property. The BuddyControl property sets or returns the Ocx control used as the buddy control. The arrows may be positioned vertically (default) or horizontally with the Horizontal property.
Ocx UpDown up = "", 99, 10, 15, 18
Ocx TextBox tb = "0", 70, 11, 40, 16 : tb.BorderStyle = 1
up.LeftAlign = True // Moves it to the left of the Textbox
up.Horizontal = True // Converts UpDown to virtual Left/Right
up.BuddyControl = tb // Combines the UpDown OCX with the Textbox
Do : Sleep : Until Me Is Nothing
Changing anyone of the these properties has an effect on the assigned Buddy Control, usually foreshortening it. To see the effect, move the BuddyControl line up two and you will notice that the textbox all but disappears.
{Created by Sjouke Hamstra; Last updated: 24/09/2014 by James Gaite}