Tree component transparent background

Trying to make the tree component have transparent
background.
I have tried puting it in a movie clip and making that Alpa =
0 but that makes the scroll bar and node icons disappear.
Is there a actionscript genius out there that would be kind
enough to help an aspiring flash junkie out?
Thanks in advance.

I just did the same myself and it became transparent....
import mx.styles.CSSStyleDeclaration;
if(_global.styles.Tree==undefined){
_global.styles.Tree=new CSSStyleDeclaration();
_global.styles.Tree.setStyle("backgroundColor","undefined");
however - after i did this, i lost the possibility to click
on the items in the tree - i could move with the up and down arrows
but thatds not the point so can anyone help me out here
please?

Similar Messages

  • Tree Component transparency

    when i try to make transpareny in tree component mouse events
    misses.what can in do

    I tried all different ways also but it didn´t work, but
    then I found the solution. You can do it in two ways...
    1: Convert the tree component to a graphic symbol and drag
    the Alpha down.
    2: Lets say that your tree is named thetree in "instance
    name" you can write: thetree._alpha=50; in the trees actionscript.
    It worked for me..
    Micke

  • The Tree component

    Do any one know how to make the tree component transparent?
    I´ve tried a lot of different things but it doesn´t seem
    to work. I´ve tried to make it to a moviclip and drag the
    Alpha to 0 but then it doesn´t work at all. You can´t see
    the nodes..
    Please..
    [email protected]

    I have achieved this by placing the tree and data components
    within a container movie clip, and then changing the alpha of that
    container.
    It worked for me.

  • Tree Component Background Color

    Hi,
    I am using the Tree Component, it has 3 nodes.
    - Is there a way I could change the background color when
      I open each node.
    - Is there a way to change the font of the text
      associated to each node.
    Any Help would be appreciated.
    NAC

    Hi SAP Partner,
    What I have understood from your question is :
    1) you want to display the selected node in a different color than the rest of the nodes
    2) You need to change the text style of the tree as a whole(but not dynamically)
    If this is your requirement, you can make use of themes either in WebDynpro itself or Portal themes if you are embedding your application into portal.
    For applying webdynpro themes this link may help you
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/colourful webdynpro applications.pdf
    But I feel it is much more easier to do it from portal side if you have some portal knowledge. I cannot offer you any document saying how to do it from portal. But you might get some help from EP forum.
    Hope this helps,
    Best Regards,
    Nibu.

  • Change the Tree Component background

    Does anyone know how can i change the Tree Component
    background ?
    PLS HELP

    Check out the Component Reference... you change the icon for
    a single node, as far as I know there's no automated process beyond
    that. So assuming your tree component instance is named "theTree"
    you might do this to change the icon of the first node:
    theTree.dataProvider = yourXML; // make sure you don't try to
    change the icon before you load data into the tree
    var theNode = theTree.getTreeNodeAt(0); // the first node in
    your tree
    theTree.setIcon(theNode,'myIcon'); // set the icon
    Where "myIcon" is a MovieClip you have in your library that
    you have set the "linkage identifier" as "myIcon".
    That iconFunction doesn't make a whole lot of sense to me,
    because first of all I don't know why it would be attached to
    theTree, and second it's referring to "item" which is not defined,
    and third its taking the parameter "node" and not doing anything
    with it. But perhaps there is some cool way to make a single
    function which handles icons for your entire tree automatically,
    that would certainly be nice.
    However, like I said, as far as I know that function will do
    nothing without calling tree.setIcon() in some way. I just made a
    function which might do what you want -- it recursively loops
    through an entire tree and sets it's icon based on the XML
    attribute "icon":
    function setAllIcons(branch){
    for(var i in branch.childNodes){
    var node = branch.getTreeNodeAt(i);
    theTree.setIcon(node,node.attributes['icon']);
    if(node.hasChildNodes){
    setAllIcons(node);
    So basically, you run setAllIcons(theTree.dataProvider) after
    you have loaded and applied the XML.

  • Custom background Colour of tree component

    I want to set custom background to each node of the tree
    component.
    I've tried
    myTree.setPropertiesAt(2, {backgroundColor:0x000000});
    or
    myTree.getTreeNodeAt(2).setStyle("backgroundColor",
    0x000000);
    but also not working
    how could I do this?
    pls help.

    From the API docu
    Further, if you do not invoker super's implementation you must honor the opaque property, that is if this component is opaque, you must completely fill in the background in a non-opaque color. If you do not honor the opaque property you will likely see visual artifacts.
    I read this as either call super.paintComponent() or you must draw a filled rectangle of the background color yourself, but that whether it changes the background color or not, also depends on the setOpaque(true).
    Reading that it seems as though it is a combination of our suggestions.

  • Permanently removing part of an image from a transparent background png file

    Hello, I think I know the answer to this question, but I wanted to double check.  I am new to Photoshop and do not know all the functions.  I have a png transparent background file of a tree with a lot of branches.  I want to erase some of the branches so they are just permanently gone.  I would like to use this image on different backgrounds so I am looking to just erase the branches all together.  Is this possible?  If not in Photoshop, perhaps another adobe program?  Thank you!

    If you want to permanently delete the branches then you can just erase them using the eraser tool. I would always suggest keeping the original file just in case something goes wrong and you want to start again. So just open the .png, save a new version and start erasing the branches you want.
    Simple video:

  • Framing image with transparent background png frame

    hi,
    i'm trying to find a way to frame images with transparent background png frames...
    what i'm doing now is
    1-drawing my image on a panel
    2-creating a 2nd image using the frame's filename, stretching this 'frame-image' to a size slighlty larger than that of my main image and drawing the 'frame-image'
    the problems with this method are:
    1-depending on the width of the frame, the frame sometimes hides parts of the image (thick frame), and sometimes there is a gap between the frame and the image (thin frame).
    2-if the image file containing the frame is larger than the frame (Ex: The image is 300x300, the frame is centered in this image and is 200x200; as opposed to the image is 200x200 and the frame takes up all the space), when i position the 'frame-image' near the top left corner of the image i want to frame, the frame appears at the wrong place (shifted down and to the right). This is due to the fact that i'm placing the top corner of the created 'frame-image' and not the frame, who is not in the top corner of my 'frame-image'.
    Is there a way to do what i'm trying to do???
    My ideas (which i don't know how to achieve are)
    1-To 'analyse' my transparent background png file and
         1-only keep the frame,
         2-calculate the frame's thickness
    OR
    2-Let java do the analyzing for me and tell it to frame my image with the frame in the png file
    please feel free to ask for more explanations if my description/question is confusing,
    thanks.

    Have you looked into the Border interface? If what you really want to do
    is put a custom border on a component, you may be able to do it this way.
    Anyway, here is some code that stacks and centres 2 images. It's not hard to do.
    import java.awt.*;
    import java.awt.image.*;
    import java.io.*;
    import java.net.*;
    import javax.imageio.*;
    import javax.swing.*;
    public class Example extends JComponent {
        private BufferedImage backgroundImage;
        private BufferedImage foregroundImage;
        public Example(BufferedImage backgroundImage, BufferedImage foregroundImage) {
            this.backgroundImage = backgroundImage;
            this.foregroundImage = foregroundImage;
        public Dimension getPreferredSize() {
            int w = backgroundImage.getWidth();
            int h = backgroundImage.getHeight();
            return new Dimension(w, h); //assuming this is bigger
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            int w = getWidth();
            int h = getHeight();
            //paint both, centred
            int x0 = (w-backgroundImage.getWidth())/2, y0 = (h-backgroundImage.getHeight())/2;
            g.drawImage(backgroundImage, x0, y0, null);
            int x1 = (w-foregroundImage.getWidth())/2, y1 = (h-foregroundImage.getHeight())/2;
            g.drawImage(foregroundImage, x1, y1, null);
        public static void main(String[] args) throws IOException {
            URL url1 = new URL("http://weblogs.java.net/jag/Image54-large.jpeg");
            URL url2 = new URL("http://weblogs.java.net/jag/DukeSaltimbanqueSmall.jpeg");
            JComponent comp = new Example(ImageIO.read(url1), ImageIO.read(url2));
            final JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.getContentPane().add(comp);
            f.pack();
            SwingUtilities.invokeLater(new Runnable(){
                public void run() {
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    }

  • Spark skinning - combobox transparent background issue

    Hi,
    I have a custom combobox component whose background is transparent when it is in a titlewindow , but looks opaque in a cell of a datagrid. The code for background for combobox is
    <!--- Defines the appearance of drop-down list's background fill. -->
    <s:Rect id="background" left="1" right="1" top="1" bottom="1" >
    <s:fill>
    <!---@private
    The color of the drop down's background fill.
    The default color is 0xFFFFFF.
    -->
    <s:SolidColor id="bgFill" color="0xFFFFFF"/>
    </s:fill>
    </s:Rect>
    The code for background fill of titlewindow is
    <!-- layer 2: background fill -->
    <!--- Defines the appearance of the TitleWindowSkin class's background. -->
    <s:Rect id="background" left="1" top="1" right="1" bottom="1">
    <s:fill>
    <!--- Defines the TitleWindowSkin class's background fill. The default color is 0xFFFFFF. -->
    <s:SolidColor id="backgroundFill" color="#FFFFFF"/>
    </s:fill>
     </s:Rect>
    Though setting the alpha to 1 in either code did not work. Please help.

    Setting of contentBackgroundAlpha for the combobox worked.

  • Transparent background of tooltip

    Hi! Does anybody know how to set transparent background in my own JToolTip?
    I tried to do it with setOpaque, but there was no effect (maybe I did sth wrong)...
    Thanks for help!

    As I know Swing creates a separate window for tooltip (not as lightweight component). On the same time there is no support for
    transparent windows in Swing/AWT (at least in Java 5.0).
    As a workaround you could try to use a glass pane and draw your
    own tooltip manually. One disadvantage is that in this case your tooltip will be shown only inside your window bounds.
    Another solution is to create you own window. Make screen capture
    through java.awt.Robot. Paint the screen image on the window and paint tooltip text on top and show the window instead of tooltip manually.

  • Spark VideoPlayer - Transparent background

    Please how to set transparent background for <s:VideoPlayer/> component? The standard color is black, but I need a SIMPLE way, how to change it. I don't want to create my own brand-new skin. Is it possible to do it using ActionScript?
    Thanks
    Häkka

    <mx:DataGrid contentBackgroundAlpha="0"/>
    and in the css
    mx|DataGrid
        backgroundAlpha:0;
    (note: this will give a compiler warning saying this style is only available for the halo, but it works )

  • How to insert image with transparent background?

    I have several logos saved at .GIFs with transparent backgrounds that I would like to import into my dashboard, but it seems that the image component only supports JPEG.  Is there a way to import images while maintaining their transparency?

    Well, you CAN insert GIFs or other image formats.  But I have yet to figure out a way to take a GIF with a transparent background and import it into my Xcelsius while preserving the transparency.  The transparent background always just defaults to white.
    This is a crucial feature as I have some logos I want to use that are circular.  But if I can't give them a transparent background, it drastically limits their placement options.
    I know that flash does support transparency, so am I missing something here?

  • Drawing images with transparent background on any AWT container control.

    I have an AWT applet with some background image.
    There is another image say of a size of an icon which
    has a transparent background. This image can be
    dragged anywhere on the applet.
    I am using a panel of a size of an icon and drawing the
    image on it. The whole panel is dragged when the user
    drags the image.
    The problem over here is, though the image has a
    transparent background it is not appearing transparent
    on the applet because the background of its container
    i.e., the panel which is dragged along, itself is not
    transparent.
    My question is : "Is there a way to make a control, like a panel, background transparent in AWT or some other way that can produce a similar effect in AWT ?".
    Please help me out.
    Thanks.

    Maybe the best way is to create your own component ( extending Component ) and then implementing paint() to do what you need.

  • Creating a transparent background with a SWF file for Export to Air

    I have been trying to place a SWF with a transparent background into an image component and use as a background for a widget. When I place the swf (just a simple single frame swf file) and output with any other method the background works perfectly. If I output to air then the background is a white rectangle with only a progress bar the stays at 0%. I have tried to not embed it but I get a broken link icon in the same rectangle.
    What am I missing? Should the swf file have some special setting that I am missing?
    I am using Xcelsisus 2008 with SP1 and FP1.
    Thank you for any assistance.
    Heath

    While there is no means to be sure about the method in which SAP/BO creates their components. My assumption is that the component uses the WindowedApplication or an HTMLLoader object(more likely) to display each SWF file.
    If this is the case then it is a known limitation in Adobe Air that we may be able to overcome by trying out the methods described in the following link:   [Air Transparency Help|http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e09.html#WS5b3ccc516d4fbf351e63e3d118676a452d-7fe5]
    Or try this link for more detail on [HTMLLoader display options within Air|http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7e79.html#WS5b3ccc516d4fbf351e63e3d118676a3e36-7ff9]
    Let me know if this works! Now I'm curious...

  • After make transparent background everything is transparent - what a stupid FLEX !!

    I created transparent background. But each component placed on this background is also transparent - only letters are visible. I can't make other background for these components - for example button - I can't create red button:
    http://img42.imageshack.us/my.php?image=09022009093428.png
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="250" height="250" alpha="0.0" >
            <mx:Button x="23" y="50" label="Button" fillAlphas="[1.0, 1.0, 1.0, 1.0]" fillColors="[#F50D0D, #F50D0D]" alpha="1.0"/>
    </mx:Application>
    Screen on yellow website Flex application WITHOUT transparent background:
    http://img15.imageshack.us/my.php?image=09022009094150.png
    Screen on yellow website Flex application WITH transparent background:
    http://img7.imageshack.us/my.php?image=09022009093631.png
    Does anybody know how I can make not transparent components for transparent background ?

    I didn't know about Category View in Flex Builder. I thought that Standard View has got the same properties as Category View. But as I see Category View has got much more properties !!
    backgroundAlpha="0" works !! at least - thx !! So screen with this option in Flex Builder:
    http://img27.imageshack.us/my.php?image=09022009162253.png
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="250" height="250" backgroundAlpha="0">
            <mx:Button x="175" y="10" label="Button"/>
            <mx:TabNavigator x="25" y="40" width="200" height="200">
                    <mx:Canvas label="Tab 1" width="100%" height="100%">
                    </mx:Canvas>
            </mx:TabNavigator>
    </mx:Application>
    Screen - final result: http://img136.imageshack.us/my.php?image=09022009162759.png
    thx very much

Maybe you are looking for