Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Treeview Creates An Extra Column?

    Cinema 4D SDK
    r21 python
    2
    3
    376
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bentraje
      last edited by

      Hi,

      I have this code that sets the Tree View Column to only 1.

      def InitValues(self):
              layout = c4d.BaseContainer()
              layout.SetLong(121212, c4d.LV_TREE)
              self._tree_gui.SetLayout(1, layout)
      
              self._tree_gui.SetHeaderText(121212, "Folder")
              self._tree_gui.Refresh()
      

      As you can see in the illustration below, it works but it produces an extra column
      https://www.dropbox.com/s/r8xkz5oaekyt5o3/c4d262_treeview_unnecessary_column.jpg?dl=0

      Is there a way around this?

      Regards,
      Ben

      1 Reply Last reply Reply Quote 0
      • M
        m_adam
        last edited by

        Hi @bentraje this is not an "extra" column but just a display of the current column.
        If you want to get rid of it during the creation of the TreeView pass set both TREEVIEW_MOVE_COLUMN and TREEVIEW_RESIZE_HEADER to False

        customgui.SetBool(c4d.TREEVIEW_MOVE_COLUMN, False)
        customgui.SetBool(c4d.TREEVIEW_RESIZE_HEADER, False) 
        

        Cheers,
        Maxime

        MAXON SDK Specialist

        Development Blog, MAXON Registered Developer

        1 Reply Last reply Reply Quote 1
        • B
          bentraje
          last edited by

          @m_adam

          Thanks! Works as expected

          1 Reply Last reply Reply Quote 0
          • First post
            Last post