FolderBrowserDialog - Select File

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 4 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
zuluwave
Posts: 9
Last visit: Thu Feb 29, 2024 11:35 am

FolderBrowserDialog - Select File

Post by zuluwave »

To help you better we need some information from you.

*** Please fill in the fields below. If you leave fields empty or specify 'latest' rather than the actual version your answer will be delayed as we will be forced to ask you for this information. ***

Product, version and build: Powershell Studio 2019
32 or 64 bit version of product: 64
Operating system: 10
32 or 64 bit OS: 64

*** Please add details and screenshots as needed below. ***
Please help! I am using the Tab Control tutorial as a basis, with the "Get Folder" button successfully. On another tab I would like to select a file, not a folder.

The following forum post references using FolderBrowserDialog to select a file instead of a folder; viewtopic.php?t=2318. "PowerShell Studio has two control sets can provide good examples for what you want: TextBox - Browse For File TextBox - Browse For Folder All you have to do is alter the Filter property of the OpenFileDialog or the FolderBrowserDialog depending on the Control Set. David"

I please need help in understanding how to set the "filter property" to select a file? Or should I use the "Textbox - Browse for file" tool under Control Sets instead?

I appreciate any guidance and help! Thank You!


DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
User avatar
Alexander Riedel
Posts: 8488
Last visit: Tue Apr 16, 2024 8:42 am
Answers: 20
Been upvoted: 37 times

Re: FolderBrowserDialog - Select File

Post by Alexander Riedel »

[Topic moved by moderator]
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
localpct
Posts: 397
Last visit: Thu Oct 27, 2022 5:57 am

Re: FolderBrowserDialog - Select File

Post by localpct »

Open your project
Go to the Design Tab
Then look up a bit and to the left
You'll have three boxes

Controls | Control Sets | Select

Click Control Sets, then double click which you want
Attachments
2019-11-11_14-46-23.png
2019-11-11_14-46-23.png (17.51 KiB) Viewed 1572 times
This topic is 4 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