Page 1 of 1

create checkbox automatic from text

Posted: Tue Jan 12, 2021 11:13 am
by olivier56
Hello
I would like to know how to create checkboxes automatically according to a number of lines in a notepad:
for example in the note pad I have blue green red
I would like that when the form is opened, there are as many checkboxes as there are lines with the corresponding name.

thank you for your return
br

Re: create checkbox automatic from text

Posted: Tue Jan 12, 2021 12:11 pm
by brittneyr
[Topic moved by moderator to PowerShell GUI forum]

Re: create checkbox automatic from text

Posted: Tue Jan 12, 2021 3:23 pm
by jvierra
Use a CheckedListBox and load the array of lines directly into the CheckedListBox.

Re: create checkbox automatic from text

Posted: Wed Jan 13, 2021 8:37 am
by olivier56
hi
thank you
work fine but now i would like have value checked in checklistbox

for each checked item do
m my code

thanck you

Re: create checkbox automatic from text

Posted: Wed Jan 13, 2021 10:09 am
by olivier56
hi
i find how
but how i can do this
$valeur= "showonly:" + $checkedlistbox1.CheckedItems make that aubouttototutu
I would have this :
aubout;toto;tutu
how i can do it
br

Re: create checkbox automatic from text

Posted: Wed Jan 13, 2021 11:59 am
by jvierra
Your question is not understandable.

Start here: https://info.sapien.com/index.php/guis/ ... nistrators

There are articles for most controls that will explain how to use them. You can also access the articles by right-clicking on the control in the toolbox.

Re: create checkbox automatic from text

Posted: Sat Jan 16, 2021 8:32 am
by olivier56
hi

thank you

br