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

    Read only edit

    SDK Help
    0
    6
    887
    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
      Helper
      last edited by

      On 11/10/2017 at 07:54, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   R19 
      Platform:   Windows  ; Mac  ;  
      Language(s) :     C++  ;

      ---------
      Hello,
      I have simple dialog window derived from GeModalDialog and in CreateLayout() function I'm making edit control with call AddEditText(..).

      It is possible to make that edit control read-only? (so user can select and copy text from it, but cannot change it).

      PS: AddMultiLineEditText with style DR_MULTILINE_READONLY does exactly what I need except it doesn't match the style of other edit controls (it has scrollbar on right side and is a bit bigger).

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

        On 11/10/2017 at 08:35, xxxxxxxx wrote:

        Why not make a static text?

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

          On 11/10/2017 at 15:12, xxxxxxxx wrote:

          As gr4ph0s says.

          You can also SetEnable(id, FALSE) using the id of the AddEditText() gadget and the user cannot edit it (virtually, read-only).

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

            On 11/10/2017 at 22:41, xxxxxxxx wrote:

            Of course I know that static text or disabled edit may look ok but in my case user needs to select the text and copy it to clipboard.

            It is hardware number required for plugin activation, forcing user to manually copy digit by digit that long number is not an option.

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

              On 12/10/2017 at 00:41, xxxxxxxx wrote:

              User can select a static text 😉

              Or if you really want an edit, simply make an edit field and in the command message of your dialog/description simply check if id == your edit and then reset it to the value you want.

              Another option is to make a button copy to clipboard.

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

                On 12/10/2017 at 00:46, xxxxxxxx wrote:

                Thank you, I didn't expect that from the static text.  ... cinema is full of surprises 🙂

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