Multi selection combobox Drop-down list

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 9 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
taheito
Posts: 5
Last visit: Sat Oct 08, 2016 10:14 pm

Multi selection combobox Drop-down list

Post by taheito »

Hello,
i am trying to create multi selection drop-down list combo-box, but i dont know to to do so.

i have the below script and i want to be able to select multi users from the generated Drop-Down list
PowerShell Code
Double-click the code block to select all.
$combobox2_Role_SelectedIndexChanged = {
	
	$combobox1_List.Items.Clear()
	$role = $combobox2_Role.Text
	$statusbar1.Text = $combobox2_Role.Text
	$global:Group = $global:School + " " + $role
	$comboUsers = Get-QADGroupMember -Identity $global:Group -Enabled -SizeLimit 0 |
	ForEach-Object{ $_.DisplayName }
	
	$combobox1_List.Items.Addrange($comboUsers)
	
}
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Multi selection combobox Drop-down list

Post by jvierra »

Comboboxes do not support multi-select. Use a listbox.
User avatar
taheito
Posts: 5
Last visit: Sat Oct 08, 2016 10:14 pm

Re: Multi selection combobox Drop-down list

Post by taheito »

jvierra wrote:Comboboxes do not support multi-select. Use a listbox.

listbox will work with my code and give me the same result ?
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Multi selection combobox Drop-down list

Post by jvierra »

Only you can answer that. I have no idea what you are trying to do.
This topic is 9 years and 5 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked