Delete all items of a TREEVIEW

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Delete all items of a TREEVIEW

      Hello,
      I would like to delete all items of a TREEVIEW in order to re-populate it with other items.
      The user guide says about TREEVIEW_ITEM_Delete():
      "In case of deleting a tree the root element of the tree should be passed to the
      function."
      What is the root element and how can I get its handle?

      Best regards
      Jan
    • Hi,

      you might try the function TREEVIEW_GetItem(). Just take a look into the API description of the TREEVIEW widget. It explains the parameters to be used with this functions.

      A TREEVIEW can have multiple root elements but using the function above you can iterate over the items and delete them one by on.

      Regards,
      Sven
      Please read the forum rules before posting.

      Keep in mind, this is *not* a support forum.
      Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
      Should you be entitled to support you can contact us via our support system: segger.com/ticket/

      Or you can contact us via e-mail.