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

    Getting cursor info from AddMultiLineEditText

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 354 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 18/05/2016 at 05:12, xxxxxxxx wrote:

      I have a AddMultiLineEditText with options: read only, Highlight and status bar.
      I works fine and the status bar indeed gives the Line and Pos.

      Now I like to know how to get this status bar information.

        
      self.AddMultiLineEditText(FIELDLEFT, flags=c4d.BFH_LEFT, initw=200, inith=200,
       style=c4d.DR_MULTILINE_HIGHLIGHTLINE | c4d.DR_MULTILINE_READONLY | c4d.DR_MULTILINE_STATUSBAR)        
      
      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        On 19/05/2016 at 03:27, xxxxxxxx wrote:

        Hello,

        it seems that it is not possible to obtain the current line and position from that gadget. But it is possible to obtain the overall cursor position by sending the message BFM_EDITFIELD_GETCURSORPOS:

          
        message = c4d.BaseContainer(c4d.BFM_EDITFIELD_GETCURSORPOS)  
        message.SetBool(c4d.BFM_REQUIRESRESULT, True)  
          
        pos = self.SendMessage(self._multilineID,  message)  
        print(pos)  
        

        best wishes,
        Sebastian

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

          On 19/05/2016 at 11:10, xxxxxxxx wrote:

          I will give a try, thanks.

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