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

    Setting the width of a treeview column

    Cinema 4D SDK
    r20 python
    2
    3
    486
    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.
    • P
      pim
      last edited by

      How can I set the width of a treeview?

      I have only one column, but in the view I see 2 columns?
      0c87535e-740b-425b-a7ef-9a39684f09b2-image.png

              layout = c4d.BaseContainer()
              layout.SetInt32(ID_NAME, c4d.LV_USERTREE)
              self._treegui.SetLayout(1, layout)
      
      1 Reply Last reply Reply Quote 0
      • P
        pim
        last edited by

        Solved.
        def GetColumnWidth(self, root, userdata, obj, col, area):
        return 200 # All have the same initial width

        1 Reply Last reply Reply Quote 0
        • ManuelM
          Manuel
          last edited by

          hello,

          that's because you set the width of your columns to more that what it show.

          But you can simply passed that argument when you add your customGUI

          settings.SetBool(c4d.TREEVIEW_RESIZE_HEADER, False)
          

          In the c++ doc you have that page and in python this one

          Cheers,
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

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