Old edit text gadget colour issue



  • On 27/07/2017 at 05:13, xxxxxxxx wrote:

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

    ---------
    Hi folks,

    Scott brought up an issue that went unresolved a few years a go. Link to his post here. He seemed to think there was another 'layer' if you like, that he was missing when trying to colour a dialog edit text area. I couldn't see the image in Scott's post, so added one in the link below to highlight it. The area in question is the darker grey where the white dot is.

    Edit text area gadget bg

    These are the IDs I'm currently aware of:

    SetDefaultColor(DLG_NAME_TEXT, COLOR_BG, Vector(0.0,1.0,0.0));       //Sets outside bg area
    SetDefaultColor(DLG_NAME_TEXT, COLOR_TEXT_EDIT, Vector(1,0,0));      //Sets color of text
    SetDefaultColor(DLG_NAME_TEXT, COLOR_TEXTFOCUS, Vector(0,1,0));      //Sets color of cursor line when typing
    SetDefaultColor(DLG_NAME_TEXT, COLOR_BGSELECTEDTEXT, Vector(0,0,1)); //Sets color of text background (when highlighted)
    SetDefaultColor(DLG_NAME_TEXT, COLOR_FGSELECTEDTEXT, Vector(0,0,0)); //Sets color of text foreground (when highlighted)
    SetDefaultColor(DLG_NAME_TEXT, COLOR_TRANS, Vector(0,0,0));          //Sets background color behind the text (trans. bg)
    

    I've looked through the colours header, but it's not really helping. Is there another ID here that would complete the picture?

    WP.



  • On 28/07/2017 at 02:38, xxxxxxxx wrote:

    Hello,

    the gadget also pays attention to the IDs COLOR_BGEDIT and COLOR_BGTRISTATE. But honestly I'm not sure what exactly you want to achieve in the end.

    best wishes,
    Sebastian



  • On 28/07/2017 at 02:56, xxxxxxxx wrote:

    Hi,

    I in the python sdk there are the available colors listed. 
    Even though they are from the python sdk documentation I guess they are the same as in c++? 
    https://developers.maxon.net/docs/Cinema4DPythonSDK/html/modules/c4d.gui/GeDialog/index.html?highlight=setdefaultcolor#GeDialog.SetDefaultColor

    maybe it helps.

    Florian



  • On 28/07/2017 at 17:25, xxxxxxxx wrote:

    Thanks Sebastian and Florian,

    Seb - those two IDs don't seem to change anything for me. I'm trying to change the bg colour inside the gadget text area so that the background colour is consistent. Currently I can only change the background colour of the text, which is of no use by itself because the background around the text (where the white dot is in the image link above) isn't changing with it. So I'm after the ID that changes that part. I've knocked up another image example, link below. Does that make a bit more sense?

    AddEditText background

    Florian - thanks for the link to the list!

    WP.



  • On 31/07/2017 at 07:44, xxxxxxxx wrote:

    Hello,

    this part of the GUI is not dynamically drawn. It is a fixed part of the color scheme (Light, Dark). It is "hardcoded" in a TIF file of the scheme e.g. \resource\modules\c4dplugin\schemes\Dark\normal.tif so it cannot be changed for a single GUI element.

    If you need full control over the gadget you might have to create you own custom GUI.

    best wishes,
    Sebastian



  • On 01/08/2017 at 01:56, xxxxxxxx wrote:

    Ok no worries - thanks for the info Sebastian. I'll stick with the sdk gadget, it works.

    Congrats to you guys on the R19 release too - well done!

    WP.


Log in to reply