Type | Description | |||
X as Variant | A safe array of numeric values that indicates the x coordinate, a numeric value that indicates the x position being inserted. A positive value means the absolute position. A negative value means a relative position, For instance, the 100 means that the field will be positioned at 100 pixels from the left side of the control's client area. The -.5 means that the field will be positioned at the center of the control's client area. | |||
Y as Variant | A safe array of numeric values that indicates the y coordinate, a numeric value that indicates the y position being inserted. A positive value means the absolute position. A negative value means a relative position, For instance, the 100 means that the field will be positioned at 100 pixels from the top side of the control's client area. The -.5 means that the field will be positioned at the center of the control's client area. |
The following VB sample arranges the fields from the left to the right:
With Record1 .BeginUpdate .FieldWidth = 96 .Layout = exLeftToRight Dim i As Long For i = 1 To 10 With .Add("Editor <b>" & i & "</b>", EditType) .Value = i End With Next .EndUpdate End With
The following VB sample arranges the fields from the top to the bottom:
With Record1 .BeginUpdate .FieldWidth = 96 .Layout = exTopToBottom Dim i As Long For i = 1 To 10 With .Add("Editor <b>" & i & "</b>", EditType) .Value = i End With Next .EndUpdate End With
The following VB sample arranges the fields in a circle:
Dim n As Long, pi As Double pi = 3.1415 n = 10 With Record1 .BeginUpdate .FieldWidth = 96 .Layout = exCustomLayout Dim i As Long For i = 1 To n With .Add("Editor <b>" & i & "</b>", EditType) .Value = i ' If negative numbers are used, the absolute value represents the coordinate proportionally with the control's size. In this case the control is consider as being 0..1 Record1.CustomLayout -(0.5 + Sin(i * 2 * pi / n) / 2), -(0.5 + Cos(i * 2 * pi / n) / 2) End With Next .EndUpdate End With