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

    Can STATICTEXT be multi line?

    Cinema 4D SDK
    2
    4
    463
    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

      Hi,

      I got a STATICTEXT gadget in a GeDialog, and have to display a text with a line break.

      It is well known that GeLoadString(), which I'm using to get the string from the resource, does not support "\n" to create line breaks. The "\n" will display in the UI. Replacing "\n" with GeGetLineEnd() does hide the "\n" but does not create a line break either, when used in a STATICTEXT.

      Long story short: Is it at all possible to get a STATICTEXT to display two lines of text?

      Thanks & cheers,
      Frank

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

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

        Update:

        String test = "First line!\nSecond line!"_s;
        

        Using this string in a STATICTEXT, does create a line break on Windows, but not on macOS... so how would it work on macOS? Of course, even on Windows it only works when the string is hard-coded, loading it with GeLoadString() does not work.

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

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

          hello,

          I can confirm that. Now i wonder if it's a bug on windows or osx. I'm not sure if the static text was create to be able to use multiple lines.

          I've opened a Bug Entry.

          For now once solution is to use AddMultiLineEditText setting the flags to DR_MULTILINE_READONLY

          I know, not the best one by far.

          Cheers,
          Manuel

          MAXON SDK Specialist

          MAXON Registered Developer

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

            Thank you, that's what I suspected 🙂

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

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