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
    • Recent
    • Tags
    • Users
    • Login

    ScrollGroupBegin only for Modal

    Scheduled Pinned Locked Moved PYTHON Development
    2 Posts 0 Posters 180 Views
    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.
    • H Offline
      Helper
      last edited by

      On 01/10/2014 at 15:13, xxxxxxxx wrote:

      I'm writing a plugin and need an ASYNC dialog. I tried using ScrollGroupBegin but it only scrolls when my dialog type is MODAL. Whats up with that? Is there not a way to use it with an ASYNC dialog? I need to be able to dock my plugin.

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 01/10/2014 at 16:07, xxxxxxxx wrote:

        It should work fine with async dialogs. I've used it in my poselibrary plugins.

        Here's a very quick and dirty script manager example.
        When I dock the dialog above the OM. The bottom scroll bar appears as expected.

        import c4d  
        class Dialog(c4d.gui.GeDialog) :  
          
          def CreateLayout(self) :  
          
              flags = c4d.SCROLLGROUP_HORIZ | c4d.SCROLLGROUP_VERT  
              if self.ScrollGroupBegin(0, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT, flags, 100, 100) :  
                  self.AddButton(1000, c4d.BFH_SCALEFIT | c4d.BFV_SCALEFIT,600,50)  
                  self.GroupEnd()    
          
              return True  
          
          def Command(self, id, msg) :  
              if id == 1000:   
                  self.LayoutChanged(1000)  
              return True  
          
        dlg = Dialog()  
        dlg.Open(c4d.DLG_TYPE_ASYNC)
        

        -ScottA

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