Treeview Creates An Extra Column?



  • 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



  • 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


Log in to reply