private void ZzCleaner_Load(object sender, EventArgs e)
{
Region = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, Width, Height, 25, 25));
richTextBox1_Load();
if (!string.IsNullOrEmpty(Properties.Settings.Default.FoldersToClear))
{
Properties.Settings.Default.FoldersToClear.Split(',')
.ToList()
.ForEach(item =>
{
bool checkbox = false;
if (!FoldersToClear.Items.Contains(item))
{
FoldersToClear.Items.Add(item); //So here I add it and in here I also need to add path to that specific file. Path that I will be using is below "folderPath".
//richTextBox2.SelectionFont = new Font("Arial", 8.00f, FontStyle.Italic);
//richTextBox2.AppendText(folderPath + item + Environment.NewLine);
}
if (Properties.Settings.Default.CheckedFolders.Contains(item))
{
checkbox = true;
folderOrganiser = new FolderOrganiser(item, richTextBox1);
}
var index = this.FoldersToClear.Items.IndexOf(item);
FoldersToClear.SetItemChecked(index, checkbox);
});
}
}
I've been working on CheckboxList to change text and font size after first word or item in my case. My question is how would I set this ChecklistBox to have different font size and font family after first line or item.
Have you tried creating your own component? I created a custom component
CustomCheckedListBoxwhich extends theCheckedListBox.Then I created an instance of the
CustomCheckedListBoxand added it to the form in the code behind. Now I have to admit that this is not the most elegant solution but it was the quickest I could come up with.Here is an answer which I used as template
Here is the code of the
CustomCheckedBoxList:Here is the code of the Form: