1 Reply Latest reply on Jan 17, 2008 8:39 AM by (WorkspaceUser)

    Hardcoded colors in Workspace

      Frgive me if I am missing something obvious here - my Flex experience is minimal at best.

      I've been following the instructions in the doc on modifying Workspace to change the color scheme. Overall, it works well. Hwoever, there seem to be a number of things that seem to be hard-coded, especially on in the Peferences pane. The text for Manage UI seems to be hardcoded to be white. I looked at the source for the UISettingsPane and I see hardcoded values for color for those combo boxes, and no reference to a style.

      Is there any way to adjust those without having to recompile the whole Workspace? I was hoping to just do some quick changes on the layout...
        • 1. Re: Hardcoded colors in Workspace
          Level 1
          You're totally bang on. There are a number of areas in the Workspace code which has hard coded values and this issue has been identified.

          As for getting around this issue for now, you can't simply identify new CSS values for these components. As an example I have created my own custom workspace application and with a bit of code tweak the components with using a setStyle() function. For example:

          In my application I display the PreferencePane via a state as such:

          <mx:State name="showPreferencesState">
          <lc:PreferencePane id="pp" width="100%" height="100%" session="{session}" initialize="assignStyles()"/>

          I use the code behind pattern and define the assignStyles() function. For testing just toss it in a Script block...

          public function assignStyles():void
          pp.setStyle("color", 0xff0000);
          pp.ooo.setStyle("color", 0x00ff000);

          So, for now it looks like you'll have to navigate the components via their id and use the setStyle() approach.