Getting cursor info from AddMultiLineEditText



  • 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)        
    


  • 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



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

    I will give a try, thanks.


Log in to reply