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

    Hiding GeDialog elements

    Cinema 4D SDK
    c++ r21
    4
    7
    715
    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.
    • fwilleke80F
      fwilleke80
      last edited by fwilleke80

      Hello,

      I am trying to hide a group of elements from a GeDialog.

      In MyDialog::InitValues() I am using HideElement() to hide the group (in case the user is already logged in).

      This is how it looks before:

      Screen Shot 2020-02-24 at 15.51.42.png

      And this is how it looks after the HideElement() call:
      Screen Shot 2020-02-24 at 15.52.19.png

      So yeah, the group is kinda gone, but I would prefer it not to leave a big hole in the dialog. How can I achieve that?

      Thanks & greetings,
      Frank

      www.frankwilleke.de
      Only asking personal code questions here.

      1 Reply Last reply Reply Quote 0
      • C4DSC
        C4DS
        last edited by

        I have done something similar using HideElement to show/hide a group of elements in a GeDialog, but in my case there is no gap left.
        However, the group I am hiding is the first in a list of groups, as such there are other elements after that can fill up the gap.
        Have you tried having additional elements after? Maybe a simple empty AddStaticText, just to try out?

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

          Hi @fwilleke80, I'm not able to reproduce your issue so could you send us a quick code, or at least describe how you setup your dialog?

          But few things, while in my test I have been able to hide element in the InitValues without issue.
          You could try to call a LayoutChanged with the parent group after the HideElement.

          Cheers,
          Maxime.

          MAXON SDK Specialist

          Development Blog, MAXON Registered Developer

          1 Reply Last reply Reply Quote 0
          • fwilleke80F
            fwilleke80
            last edited by

            Hi Maxime,

            thanks for your message! Weird, I cannot reproduce it anymore, either. Strange. Sorry.

            Cheers,
            Frank

            www.frankwilleke.de
            Only asking personal code questions here.

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

              Hi,

              although the question is somehow solved I would like to point out that I have encountered a similar behaviour for GeDialog.HideElement when invoking it on elements of a resource that contains a multi-column container: The area of the hidden element went black. I do have not a solution, since I did not bother investigating the problem any further and went for disabling elements instead, but I thought it might be helpful for someone anyways.

              Cheers
              zipit

              MAXON SDK Specialist
              developers.maxon.net

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

                Thanks a lot, @zipit I was able to reproduce the issue.

                But I can confirm calling LayoutChanged on the master group of the group that is hidden, fix the issue.
                So if you if have
                Group 1000
                |----- Group 1001

                And Group 1001 should be hidden you should call LayoutChanged(1000).
                So from our point of view, it's not a bug, since either you have to hide the layout in the CreateLayout or call LayoutChanged to invalidate an area. Why it was working previously? I would say by luck because previously our redraw was not at all optimized and the whole dialog was redrawn every time, while now only the needed stuff is invalidated and redraw.

                Cheers,
                Maxime.

                MAXON SDK Specialist

                Development Blog, MAXON Registered Developer

                1 Reply Last reply Reply Quote 0
                • fwilleke80F
                  fwilleke80
                  last edited by

                  Thanks, Maxime!
                  That answers all my questions 🙂

                  I'll mark this solved now.

                  www.frankwilleke.de
                  Only asking personal code questions here.

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