6 Replies Latest reply on Jul 1, 2011 3:19 AM by Peter Kahrel

    [CS4/JS/ScriptUI]: Font colour problem: Selected item almost unreadable in treeview... help!

    Andreas Jansson Level 2

      I've created a treeView using ScriptUI:

      Capture.JPG

      As you can see, the selected node text is very hard to read (this is a MS windows machine, I haven't tried on Mac).

       

      I would like to get a white text (or rather the inverted colours... or whatever is the default behaviour for selected items) when selecting a node, but it seems the listItem (the Node), doesn't even have a graphics property. And nothing seems to change when I try to set a graphics.foregroundColor on the TreeView itself.

       

      Otherwise I would have adapted one of the examples in Peter Kahrel's splended "Beginning ScriptUI" document, where he shows how to deal with setting colour on other objects, such as statictexts (buttons are mentioned as a problem).

       

      This, for instance, doesn't work:

      myNode.graphics.foregroundColor = myNode.graphics.newPen (myWindow.graphics.PenType.SOLID_COLOR, [1, 0, 0], 1);

       

      Is there a workaround to set the font colour, anyone?

       

      Thanks,

      Andreas Jansson