persitence cheked checklistbox

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 3 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
olivier56
Posts: 16
Last visit: Tue Jan 09, 2024 6:58 am

persitence cheked checklistbox

Post by olivier56 »

Hello,
it is possible to leave the boxes checked after closing the interface and then opening it again.
thank you
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: persitence cheked checklistbox

Post by jvierra »

No. You will have to recheck them.
olivier56
Posts: 16
Last visit: Tue Jan 09, 2024 6:58 am

Re: persitence cheked checklistbox

Post by olivier56 »

ok
thank you

if i use ini file or registrery may be

br
olivier56
Posts: 16
Last visit: Tue Jan 09, 2024 6:58 am

Re: persitence cheked checklistbox

Post by olivier56 »

hi

work fine

Code: Select all

$EmplacementFichier2 = [string]
	$EmplacementFichier2 = "d:\test.txt"
	$MyArray= get-content $EmplacementFichier2
	foreach ($Item in $MyArray)
	{
		# Check it ...
		$CheckedListBox1.SetItemChecked($checkedlistbox1.Items.IndexOf($Item), $true);
	}
	


This topic is 3 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