Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Autocomplete to your Textbox forms in PowerShell #45

Open
utterances-bot opened this issue Apr 20, 2022 · 1 comment
Open

Adding Autocomplete to your Textbox forms in PowerShell #45

utterances-bot opened this issue Apr 20, 2022 · 1 comment

Comments

@utterances-bot
Copy link

Adding Autocomplete to your Textbox forms in PowerShell

FoxDeploy.com, Stephen Owen's technical blog about
PowerShell, Systems Administration, GUI Design and Programming.
.

https://www.foxdeploy.com/blog/adding-autocomplete-to-your-textbox-forms-in-powershell.html

Copy link

Just because I find the tutorial a little bit confusing for me as a beginner, there somme change you can make:

-transform the ligne :

Get-content 'C:\Any\Path\User Records.txt' | % {$textbox.AutoCompleteCustomSource.AddRange($_) }

into:

$aVariable = Get-content 'C:\Any\Path\User Records.txt'
$textbox.AutoCompleteCustomSource.AddRange($aVariable)

and :

$textbox.AutoCompleteSource = 'CustomSource' $textbox.AutoCompleteMode='SuggestAppend' $textbox.AutoCompleteCustomSource=$autocomplete

into (3 differents lines):

$textbox.AutoCompleteSource = 'CustomSource'

$textbox.AutoCompleteMode='SuggestAppend'

$textbox.AutoCompleteCustomSource=$autocomplete

It's less compact but easier to understand (and the first Get Content doesn't work for me anyway)

Have a nice day !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants