combobox dropdownlist, collection with empty value?

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 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
joeypiccola
Posts: 9
Last visit: Mon Jun 18, 2018 7:44 am

combobox dropdownlist, collection with empty value?

Post by joeypiccola »

I have a combobox with a DropDownStyle of DropDownList. I have the string collection pre-populated with some values. The issue I am having is once the user selects a value, the user can never return the value to the default value on form load which is blank. I have tried adding a blank carriage return in the collection, but the blank carriage return seems to be removed when I save, close and re-open the form project. Is there anyway to achieve this? Thanks!

Image
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Mon Apr 15, 2024 12:32 pm

Re: combobox dropdownlist, collection with empty value?

Post by Olga_B »

Thanks for reporting the issue. We are investigating this and will update you as soon as we have more information
User avatar
joeypiccola
Posts: 9
Last visit: Mon Jun 18, 2018 7:44 am

Re: combobox dropdownlist, collection with empty value?

Post by joeypiccola »

@Olga_B, thanks for taking a look. Although, I am not sure there is an issue with PowerShell Studio. I am curious as to what the expected behavior is and how to accomplish what I am trying to do (if in the event I have a UI logic issue).

Thanks again,
Joey
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Mon Apr 15, 2024 12:32 pm

Re: combobox dropdownlist, collection with empty value?

Post by Olga_B »

Joey, the issue will be fixed with the next release.
For workaround add some <>, or simple text: 'Select item' instead of empty line
User avatar
joeypiccola
Posts: 9
Last visit: Mon Jun 18, 2018 7:44 am

Re: combobox dropdownlist, collection with empty value?

Post by joeypiccola »

In the interim I have added a tool tip instructing the users to select a lable to reset the values. Works for me!

Image
This topic is 6 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