2 Replies Latest reply on Aug 26, 2009 11:07 AM by wicket971

    I cannot remove the border off a tree.

    wicket971

      I have tried everything known to man to remove the border off the tree control and I have had no success. Is this a bug? I've put the border properties on the tree itself and in the CSS and still I cannot remove that border.  I've copied and pasted the CSS styles from the style explorer (it works over there), but I still cannot get that border off. Here is my code.

       

       

      <?xml version="1.0"?>
      <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
          xmlns:s="library://ns.adobe.com/flex/spark"
          xmlns:mx="library://ns.adobe.com/flex/halo">
         
          <fx:Style>
              @namespace mx "library://ns.adobe.com/flex/halo";
              @namespace s "library://ns.adobe.com/flex/spark";
             
             Tree {
                  border-style:none;
                  border-thickness: 0;}
             
          </fx:Style>
         
         <mx:Tree id="tree1"
             labelField="@label"
             showRoot="true"
             width="160">
            <mx:XMLListCollection id="MailBox">
               <fx:XMLList>
                  <folder label="Mail">
                     <folder label="INBOX"/>
                     <folder label="Personal Folder">
                        <Pfolder label="Business" />
                        <Pfolder label="Demo" />
                           <Pfolder label="Personal" isBranch="true" />
                           <Pfolder label="Saved Mail" />
                        </folder>
                        <folder label="Sent" />
                        <folder label="Trash" />
                  </folder>
               </fx:XMLList>
            </mx:XMLListCollection>
         </mx:Tree>
      </s:Application>

        • 1. Re: I cannot remove the border off a tree.
          Peter deHaan Level 4

          Currently the Spark skins do not support all the same styles as the old MX/Halo skins.

           

          The easiest way to remove the border would be to either set the borderSkin to null:

           

          <mx:Tree id="tree1"
              labelField="@label"
              showRoot="true"
              width="160"
              borderSkin="{null}">

           

           

          Or, you could copy/paste the default Spark border skin for MX controls from <Flex SDK>\frameworks\projects\sparkskins\src\mx\skins\spark\BorderSkin.mxml and modify/remove the borderStroke Rect and then set the Tree control's borderSkin style to your custom border skin.

           

          Peter

          • 2. Re: I cannot remove the border off a tree.
            wicket971 Level 1

            Thank you so much for the quick response. This worked perfectly. My company has been doing heavy development with flash builder 4 and I've been doing 100% front end design with it and I must say I am really pleased with the direction Adobe has gone. Keep up the good work and thanks again for the response.