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

    How to layout a dialog that is smaller than its components?

    Cinema 4D SDK
    c++ python
    3
    7
    829
    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.
    • CairynC
      Cairyn
      last edited by

      Hello; here's a weird one:

      Normally, a dialog is at least as big as the sum of its content according to the layout. It does not matter which layout flags you use (FIT, SCALE, SIZE) - it will not get any smaller, even when embedding the dialog into a screen Layout or moving the dialog's borders.

      You can use a SCROLLGROUP to include a subarea that is larger than the dialog itself, yes. But what if I just don't want "overhanging" items to show? No scrollbar, no enforced size, just clipping. I know it is possible because the toolbars behave like this; icons outside of the current toolbar just disappear when the toolbar is resized too much.

      Apparently that doesn't work with an external layout file?

      1 Reply Last reply Reply Quote 0
      • ferdinandF
        ferdinand
        last edited by ferdinand

        Hi,

        you can enforce the size of a GeUserArea. So I assume toolbars take advantage of that feature/effect.

        edit: That was a bit ambiguous, what I meant was: Buttons in a toolbar are probably encapsulated in a GeUserArea.

        Cheers
        zipit

        MAXON SDK Specialist
        developers.maxon.net

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

          hello,

          If i understood correctly you want something like this but with a .res file ?

          
          		ScrollGroupBegin(1000, BFH_SCALEFIT | BFV_SCALEFIT, SCROLLGROUP_VERT | SCROLLGROUP_HORIZ  | SCROLLGROUP_NOSCROLLER | SCROLLGROUP_NOBLIT, 64, 64);
          		{
          			GroupBegin(0, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, ""_s, 0);
          			{
          				AddButton(1001, BFH_LEFT, SizePix(256), SizePix(256), "Big Button"_s);
          			}
          			GroupEnd();
          		}
          		GroupEnd();
          

          Cheers,
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • CairynC
            Cairyn
            last edited by

            Yup, something like making SCROLLGROUP_NOSCROLLER and other flags available in the .res file. I haven't tried yet to define a GeUserArea through the .res file.

            (It's a question out of interest only... a dialog where stuff is foreseeably too large for the dialog is most likely based on automatic generation of dialog components anyway, so I can go a step higher and create the non-scrolling scrolling area through code as well...)

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

              hello,

              I've sent an email to ask, I'll be back when i got something 🙂

              Cheers,
              Manuel

              MAXON SDK Specialist

              MAXON Registered Developer

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

                hello,

                really sorry for the delay of this answer and a negative one.
                There's no equivalent for SCROLLGROUP_NOSCROLLER to use in a .res file.

                Cheers,
                Manuel

                MAXON SDK Specialist

                MAXON Registered Developer

                1 Reply Last reply Reply Quote 0
                • CairynC
                  Cairyn
                  last edited by

                  Thanks for the confirmation. I guess I'll use an empty group then and fill in the scrolling group in the code.

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