Gets or sets a value indicating whether the collection of items continues to the first or last item if the user continues past the end of the list.
[Visual Basic] Public Property Wrap As Boolean [C#] public bool Wrap {get; set;} [C++] public: __property bool get_Wrap(); public: __property void set_Wrap(bool); [JScript] public function get Wrap() : Boolean; public function set Wrap(Boolean);
true if the list starts again if the user reaches the beginning or end of the collection,; otherwise, false. The default value is false.
When Wrap is set to true, if you reach the last item in the collection and continue, the list will start over with the first item and appear to be continuous. This behavior works in reverse as well.
The following example assigns an array to the System.WinForms.DomainUpDownItems.Items property for display in the up-down control. You will be able to toggle the Wrap property on and off by clicking the check box control. The code assumes that a DomainUpDown and CheckBox control have been instantiated on a form and a one-dimensional array has been filled with some data.
[Visual Basic]
Private Sub MySub() ' Assign the array contents to the DomainUpDown control. DomainUpDown1.Items.All = myArray End Sub Private Sub CheckBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) ' If Wrap is set to true, set it to false; otherwise set it to true. If DomainUpDown1.Wrap = True Then DomainUpDown1.Wrap = False Else DomainUpDown1.Wrap = True End If End Sub
DomainUpDown Class | DomainUpDown Members | System.WinForms Namespace | DownButton | UpButton