Format Method (UpDown)

Purpose

Sets or gets a format string specifying the format instructions for the numeric value for the buddy control.

Syntax

UpDown.Format = [ format ]

format:sexp

Description

The Format property specifies the string to display in the buddy control. The text for the buddy control is not set with the Text or Caption property of the buddy control itself.

The Format property uses the same format string as is used with the Format function. The type of data in the buddy control is not limited to integer values only. The Format property can specify a Date format as well.

Example

Form frm1 = "UpDown", , , 200, 200

Ocx TextBox tbu = "??", 5, 5, 150, 24

.Appearance = 1

Ocx UpDown updn

updn.BuddyControl = tbu

updn.Max = #12/31/2999#

updn.Value = Date

updn.Format = "Long Date"

Do

Sleep

Until Me Is Nothing

Remarks

The text "??" of the TextBox OCX is not displayed.

The Value for the UpDown OCX is set to the current date.

The text displayed in the TextBox is formated using the format specification in the Format property of the UpDown OCX.

See Also

UpDown, Format()

{Created by Sjouke Hamstra; Last updated: 07/10/2014 by James Gaite}