I am returning multiple different sizes of strings into a box.
I have used a System.Windows.Forms.Label
but unfortunately some of the strings are too large for it, and do not display.
I have tried replacing it with a System.Windows.Forms.TextBox
but it will not let me set the height of it past 1 line, even with multiline set to true, and scrollbars set:
$objTextBox1 = New-Object System.Windows.Forms.TextBox
$objTextBox1.Multiline = True;
$objTextBox1.Location = New-Object System.Drawing.Size(150,10)
$objTextBox1.Size = New-Object System.Drawing.Size(300,200)
$objTextBox1.Scrollbars = Scrollbars.Vertical
$objForm1.Controls.Add($objTextBox1)
Is there anything I'm missing here?
$objTextBox1 = New-Object System.Windows.Forms.TextBox
$objTextBox1.Multiline = $True;
$objTextBox1.Location = New-Object System.Drawing.Size(150,10)
$objTextBox1.Size = New-Object System.Drawing.Size(300,200)
$objTextBox1.Scrollbars = "Vertical"
$objForm1.Controls.Add($objTextBox1)
Options for Scrollbars can be "Vertical", "Horizontal", or "Both".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With