Drag and Drop for MULTISTRING in a description



  • On 14/05/2017 at 17:12, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R17, R18 
    Platform:   Windows  ;   Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    Firstly here is the setup...

    I have a GeDialog. Inside that dialog I have a DESCRIPTION.

    I then have a NodeData which has a STRING using MUTLISTRING customgui.

    STRING MDATA_SECTION_CONTENT { CUSTOMGUI MULTISTRING; SCALE_H; SCALE_V; WORDWRAP;}

    The Node is not in the document.

    The Node is assigned to the Description so that its data appears in my GeDialog.

    Question 1) Now what I would like is to be able to get a DragAndDrop message when someone drops something into the MULTISTRING. Currently what happens is that when you drag anything into the string it will write whatever C4D data it has (could be the name of the selected object or the id name of a parameter etc...). But what I would like to do is add my own text into the MULTISTRING based on what is dropped into it.

    Question 2) Additionally (and I know this is a separate question) I would like to know when someone is typing into the MULTISTRING so that I can parse the data and do something to it. At the moment you only get a message when it looses focus.

    Are either of these possible in R17 and R18? So far my tests have concluded no, but I am still hopeful that maybe there is a solution that I don't know about.

    Cheers,
    Kent



  • On 15/05/2017 at 08:32, xxxxxxxx wrote:

    Hello,

    do you want to catch the messages in the context of your GeDialog or the NodeData based element?

    A text field GUI element converts the dragged content (DescID, text, command) into a string. This behaviour is hardcoded and cannot be changed. Also the behaviour that the multi line text edit only sends a message when the focus is changed is hardcoded. It appears that there is no way around.

    best wishes,
    Sebastian



  • On 15/05/2017 at 14:21, xxxxxxxx wrote:

    I don't really mind where the message gets caught, as long as I can catch it.

    I could move the text element out of the NodeData and into the GeDialog itself and I have seen there is a way to get messages via that route. But since I also have my own text editor in the pipeline I may just wait until that is done and use that instead.

    Thanks for letting me know.


Log in to reply