Combobox - Readonly Property Possible?

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 6 years and 2 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
angelofstealth
Posts: 69
Last visit: Wed Sep 28, 2022 10:04 am

Combobox - Readonly Property Possible?

Post by angelofstealth »

Is it possible to locked down the combobox control to not be editable, ie only readonly like a textbox control? Only want the user to select an item from the dropdown, not allowed to delete the value selected/be null once selected. I didn't see this was an option in the control properties window, wondering if this is possible. Thanks,
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Combobox - Readonly Property Possible?

Post by jvierra »

Look more closely at the options. Set it to only take entries from the list. It will then not be editable.
User avatar
MarvelManiac
Posts: 63
Last visit: Thu Sep 13, 2018 3:40 pm

Re: Combobox - Readonly Property Possible?

Post by MarvelManiac »

That's a very good hint J gave you :D
It's 100% there
User avatar
angelofstealth
Posts: 69
Last visit: Wed Sep 28, 2022 10:04 am

Re: Combobox - Readonly Property Possible?

Post by angelofstealth »

figured it out, thanks
User avatar
MarvelManiac
Posts: 63
Last visit: Thu Sep 13, 2018 3:40 pm

Re: Combobox - Readonly Property Possible?

Post by MarvelManiac »

Good work
This topic is 6 years and 2 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