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

    Newline, Linebreak, \n in GUI Element

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 437 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 06/03/2013 at 00:21, xxxxxxxx wrote:

      Is it possible to have a New line in a single static text gui element?

      something like \n

        
      self.AddStaticText(HELPTEXT6, c4d.BFH_SCALEFIT, name="very very very very very very very very very very very very long sentence")
      

      kind regards
      mogh

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

        On 06/03/2013 at 00:37, xxxxxxxx wrote:

        have you tried the wordwrap flag plus a fixed width ? note very elegant, but it might work,
        i have never tried it. or you could use a read only multiline edit, but then your text would 
        have 3d border.

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

          On 06/03/2013 at 04:18, xxxxxxxx wrote:

          It should be possible.
          See e.g. this example:

          gui.MessageDialog ("Incorrect license Found.\n Please visit website to purchase a license.")_<_o:_<_o:p_>_o:p>

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

            On 06/03/2013 at 12:39, xxxxxxxx wrote:

            \n does not work with AddStaticText i get a strange unicode letter i guess.

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

              On 07/03/2013 at 01:17, xxxxxxxx wrote:

              StaticTex doesn't support multi-line strings.
              You better create a multi-line read-only EditText or various StaticText elemets each one under the other.

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