Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9060121
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:08:32+00:00 2026-06-16T15:08:32+00:00

I created a program where you can put text in a richtextbox with a

  • 0

I created a program where you can put text in a richtextbox with a button. When the button is clicked the text from this textbox is put in a listview with a checkbox on each line. This listview only has 1 column.

Now, I want to put some lines in as a subitem and to remove the checkbox from the parents, like a tree. However, I only see the parents at the moment, the subitems are not showing. I also don’t know how to remove the checkbox from the parents.

I saw the treeview class, but I don’t want the those dots before each line and I don’t know if you can add checkboxes there.

This is my code

    private void ParseButton_Clicked(object sender, EventArgs e)
    {
       string[] entries = rawLogBox.Text.Split(new string[] { "\r\n", "\n" }, StringSplitOptions.None);

       ListViewItem parent = null;
       foreach (string entry in entries)
       {
           if (Regex.IsMatch(entry, "^={10} .* ={10}$"))
           {
               parent = new ListViewItem(entry);
               parsedLogBox.Items.Add(parent);
           }
           else
           {
               if (parent == null)
               {
                   parsedLogBox.Items.Add(new ListViewItem(entry));
               }
               else
               {
                   new ListViewItem.ListViewSubItem(parent, entry);
               }
           }                 
       }
       parsedLogBox.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent);
    }

The listview is set to detail.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:08:33+00:00Added an answer on June 16, 2026 at 3:08 pm

    You have to add the SubItems like so:

    parent.SubItems.Add(entry)
    

    see also this so question

    Edit: for controlling checkboxes in a treeview: TreeView Remove CheckBox by some Nodes

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Can I run from command line program created by Eclipse? I am
I've created this program that can encrypt a found file and then it can
I created a SQLite database on Android device. The program can read/write to database
I managed to create a .deb file from a source program,tar.gz how can i
CruiseControl.net creates (by default) for each project a subdirectory under: c:\Program File\CruiseControl.NET\server How can
I created this program: #include <iostream> #include <fstream> using namespace std; int main ()
I'm trying to get my current program to take information from a dynamically created
I would appreciate it if you can help me with this program. I would
So, I've written a neat little program that can analyse Japanese text and give
I'm new to C programming. I want to create C program which can read

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.