So I'm writing a GUI that will interface with 3D printers. I'm still fairly new to Powershell in general.
Here is what I have in my code right now:
# == Baudrate Combo Box == #
$comboBox1 = New-Object System.Windows.Forms.ComboBox
$comboBox1.Location = New-Object System.Drawing.Point(80, 55)
$comboBox1.Size = New-Object System.Drawing.Size(98, 10)
$comboBox1.Items.add("250000")
$comboBox1.Items.add("115200")
So the list is generated just fine, and my options appear and can be selected as they should be. The only thing that doesn't work right, is that the ComboBox text area is editable. The edited text never passes, which is good, but I want that box to be purely read/select only.
I've seen some very generic statements all over the place, but none of them work, or are based in a different programming language like C#.
I've tried adding the following, with no luck:
$comboBox1.DropDownStyle = ComboBoxStyle.DropDownList
Running with this line inserted gives me this:
https://social.technet.microsoft.com/Forums/windowsserver/en-US/7348778d-39f3-44c4-bdab-f5496d4250b2/make-noneditable-combobox-in-powershell?forum=winserverpowershell