FlowLayoutPanel.WrapContents Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value indicating whether the FlowLayoutPanel control should wrap its contents or let the contents be clipped.
public:
property bool WrapContents { bool get(); void set(bool value); };
public bool WrapContents { get; set; }
member this.WrapContents : bool with get, set
Public Property WrapContents As Boolean
Property Value
true
if the contents should be wrapped; otherwise, false
. The default is true
.
Examples
The following code example sets the value of the WrapContents property depending on the Checked value of a CheckBox control.
private:
void wrapContentsCheckBox_CheckedChanged(
System::Object^ sender, System::EventArgs^ e)
{
this->flowLayoutPanel1->WrapContents =
this->wrapContentsCheckBox->Checked;
}
private void wrapContentsCheckBox_CheckedChanged(
System.Object sender,
System.EventArgs e)
{
this.FlowLayoutPanel1.WrapContents =
this.wrapContentsCheckBox.Checked;
}
Private Sub wrapContentsCheckBox_CheckedChanged( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles wrapContentsCheckBox.CheckedChanged
Me.FlowLayoutPanel1.WrapContents = Me.wrapContentsCheckBox.Checked
End Sub
Remarks
If the area of the panel is too small to contain all its child controls, at least one child control will be clipped regardless of the wrapping mode.
Subsequent resizing of the panel will reapply the layout to the contained controls.
Applies to
See also
Saran dan Komentar
https://aka.ms/ContentUserFeedback.
Segera hadir: Sepanjang tahun 2024 kami akan menghentikan penggunaan GitHub Issues sebagai mekanisme umpan balik untuk konten dan menggantinya dengan sistem umpan balik baru. Untuk mengetahui informasi selengkapnya, lihat:Kirim dan lihat umpan balik untuk