background color of the canvas disappeared when using updateDisplayList

If I put the code in the updateDisplayList for the canvas. The background color is missing. If I called super.updateDsplayList (), all the drawing is not show.

What is the problem with my code or the Canvas class?

<? XML version = "1.0"? >
"" < mx:Application xmlns:mx = ' http://www.adobe.com/2006/mxml " xmlns:cmp ="PlanUI.*"creationComplete ="init ()">
< mx:Style source = "2dStyle.css" / >
< mx:Script >
<! [CDATA]
Import PlanUI.TestCanvas;

public void init (): void
{
var dc:TestCanvas = new TestCanvas();
dc.percentWidth = 100;
dc.percentHeight = 100;
dc.setStyle ("backgroundColor", 0xFF0000);
this.addChild (dc);


}
[]] >
< / mx:Script >

< / mx:Application >

package PlanUI
{
Import mx.containers.Canvas;

SerializableAttribute public class TestCanvas extends Canvas
{
public void TestCanvas()
{
Super();
this.percentHeight = 100;
this.percentWidth = 100;
}

override the updateDisplayList(unscaledWidth:Number,_unscaledHeight:Number):void function
{
This.Graphics.Clear ();
super.updateDisplayList (unscaledWidth, unscaledHeight);

this.graphics.lineStyle(1,0xFF0000,0.3);
this.graphics.drawRect (0,0,200,200);
}
}
}


My solution:

It seems that the colors of the backgorund area are really wired. I've done it puts an end to transparent color 0xFFFFFE. SO, it can drag and drop. Even, is to see the face of the other object, you cannot see :)

Tags: Flex

Similar Questions

  • Effect of color in the properties lost when used to break apart.

    Flash CS5

    How does one change graph then have the possibility to choose in the properties of color effects options such as alpha or luminosity or hue in properties?

    Integrate a file .ai library and then creating a MovieClip of it, I can change alpha of the color or brightness or hue etc. in properties through the option of color effect. Use break hand to remove a simple box of a part of the work and just applied aspects of the color disappear, back to its original appearance. Try the work but still not grouping options now. It is even if I just place the image on stage or open the graphic in the library.

    Try it out bring it a different way and to break, then alter the work group then to see if the properties has color effect option for this but still no joy.

    Try to convert graphic after editing and giving it a new name, he Faints, nothing visible even if I select this chart in the library.

    It seems that the only way to apply color effect in the properties of a chart or a MovieClip is NOT to change its content when placed on the stage. I can't do without needing to modify the program making the AI. In fact adds a box that I don't need, border of the page in this program.

    Envirographics

    Color effects can be applied to an instance of a movieClip or button or graphic symbol. When you separate an instance of movieClip, you actually spend this movieClip into its different parts, similar to the edition of the original symbol in the library. These parts, lines, and fills, no longer a movieClip, and so any changes applied to the movieClip will no longer apply.

    You can select all the individual parts after your installation of these parts and then using the Edit menu, the value of this new group of lines and fills as a movieClip and reapply the color effect.

    Alternatively, if you double-click on the movieClip on the stage, you will be in the editor. Any changes you make in the editor will be displayed in the movieClip when you return to the scene. The effect color will remain.

  • How can set the background color of the status bar?

    Quote from the old forum:

    Comments: comments
    How can set the background color of the status bar?
    Posted the: July 17, 2008 02:56
     
    How can set the background color of the status bar?
    Using this code for the status bar:
    LabelField statusField = new LabelField ("Good Morning", LabelField.USE_ALL_WIDTH |) LabelField.NON_FOCUSABLE | LabelField.HCENTER)
    {
    int _backgroundColour = Color.LIGHTGREEN;
    public void paint (Graphics g)
    {
    g.setBackgroundColor (Color.RED);
    g.Clear ();
    Super.Paint (g);
    }
    };

    Font defaultfont = Font.getDefault ();
    Police smallfont = defaultfont.derive (Font.PLAIN, 12);

    statusField.setFont (smallfont);
    setStatus (statusField);

    When I ran the code you have above, my status background color was red.  Is not what you see?  If so, please provide the BlackBerry model and software version that you are testing.  You can find this under Options.

    Or if you try to do something else, please provide details.

    I tested this in the BlackBerry Simulator included with version 4.5.0 BlackBerry JDE (4.5.0.44).

    To do this in version 4.1, first call getColor and save the current color.  Then call setColor, setting the color to the color you want to use for the background.  After this call call fillRect, starting with 0, 0 and go to the size of the field (use this.getWidth () and this.getHeight () to get this).  This must fill in the field with your specified color.

    To allow the drawing of the default content of the field call setColor once again, passing in the original color, then call super.paint.

  • Change the background color in the window transparent tools

    I understand the background color in the Tools window is used to make gradients and fill in the erased areas of an image. I want to change the transparent color so that I can fill in the field are deleted an image with a transparent background grid. How can I go about it? I'm using photoshop CS2.

    Hi there-

    Could you post a screenshot of your workspace, including your layers panel? It's a little unclear what exactly you're trying to do and the problem you are experiencing.

    Work you stumbled upon a locked background layer? A locked layer displays a small lock icon in the layers panel (as shown below). You will get the following result you are trying to select and delete a zone on a locked layer:

    What is the problem you are having? If so, just double click on the locked layer in your layers panel and click OK in the dialog box that appears towards the top. You should now be able to delete a selection and you end up with a transparent area:

    Again, if this does not resolve your problem, try to provide screenshots of your workspace.

    See you soon,.

    Kendall

  • Change the background color of the slide show full-screen when the option fit content proportionally

    I signed up for a demo of Muse and I must say that I am very impressed. After using Dreamweaver in the past in school, often get bogged down in the code, Muse is a designers dream. I even told a few friends about it, calling for «InDesign for web designers» The features and tutorials on Adobes site, are fab but I need now to a little help.

    I want several images to fit the entire screen on a specific section of my Muse site, just below the navigation bar. I noticed the best way to do this is to create a slideshow full screen. With this option I can add one or more images fade in and out - communicate various messages and points of sale. By default, as the widget options are defined in the charging framework, which extends from my image to completely fill the browser. Unfortunately with this selected the image loses some quality and seems to zoom in, getting cropped in the process. When you change the settings to adjust the content proportionally everything looks great. The chart is smack bang under my sailing as I desire however there is also a horrible gray area each side because the graph is now its original size. Grey on each side seems to be the background color of the slideshow, but I can't find a way to change this - from grey to black. Please check the link for more information: https://dl.dropboxusercontent.com/u/50403221/Screen%20Shot%202014-08-14%20at%2018.00.34.pn g

    If any colleague Musers know of a way around this? Or maybe it's an enhancement request?

    Thanks, Chris

    Hi Chris,

    You can select the slideshow widget that you added and check the fill color in the control panel.

    Please refer to the following screenshot:

    Kind regards

    Akshay

  • Brush is using the background color not the FOREGROUND color.

    For some reason any my brush uses the background color not the FOREGROUND color. I went to the window of COLOR but I can't go back. ???

    Try to press B to select the tool brush then right click on its icon and select the reset tool

  • is it possible to change the background color of the checkbox control?

    Hello

    Is this possible in LV to change the background color of the checkbox system? When I try to do this via the Colors property [4] I get error 1131:

    LabVIEW: You cannot use this property with this control system.
    Property name: color [4]

    No, it's what are the control systems for. They adapt to the configuration of the machine.

    Use one of the other palettes if you want to change the color.

    Ben

  • Can we change the background color of the application?

    I tried to find a way to set a global style. If I could set the background color of the entire application, it'd save me from having to apply that color on every page.

    Setting the background color of a container in a ScrollView, also reveals a white background when you "too scroll' view. I would like to eliminate it.

    Hello level32,.

    Maybe if you set a common qml file have it set on other pages, as in the example of cascadescookbookqml, available on GitHub https://github.com/blackberry/Cascades-Samples/tree/master/cascadescookbookqml

    You will find a file RecipeContainer.qml defined on the record of the Commons and all other pages using it.

    I hope this helps.

  • Setting the background color of the screen

    Hai...

    When my application running in the Simulator, it shows only a small portion with the bgcolor that I gave in the html file. I think that the bgcolor simply encapsulates html content. So, what should I do to view the entire screen with the bgcolor.

    The problem is that in WebWorks (which uses a control called BrowserField) to view the content, the size of the display of web pages grows to the size of the content in your HTML code.

    So if height of your HTML below the screen, it will show the background color of the screen.

    To change this, you can set the window of the display using tags or set the height of the body to the size of the screen.

  • Change the background color of the banner in the theme of the APEX 25

    Hi guys,.

    I'm changing the background color of the banner in the theme of the APEX 25 (in white).

    Oracle.apex.com: Application Express 4.2.5.00.08

    Theme/UI: 25. Reactive blue

    Page template: A level Tabs - no side bar

    Using Internet Explorer 8
    I have created a sample in oracle.apex.com too, see below for credentials

    What I've done so far:

    1. create a file named orange.css with a single line:


    hgroup {background: white ;}}


    Downloaded this css file via:

    Components shared = > Cascading Style sheets

    2 then reference this CSS via the shared components = > templates = > edit the template Page = > a level Tabs - No. Sidebar = > definition = > header

    Added this line before the < / head > tag:

    < link rel = "stylesheet" href = "" #WORKSPACE_IMAGES #orange.css "type =" text/css">"

    Then changed:

    < h1 > < a href = "" #HOME_LINK # "id ="uLogo"> #LOGO # < /a > < / h1 >"

    VOX

    < hgroup > < a href = "" #HOME_LINK # "id ="uLogo"> #LOGO # < /a > < / hgroup >"

    Although the CSS works well, I have two questions:

    1. the sides of the banner are blue instead of white

    2. the disconnect next to the user name button is hidden and only appears when you browse on

    Does anyone know how to solve these problems?

    Here is a link with the model of the application:

    https://Apex.Oracle.com/pls/Apex/f?p=4500:1000:115959518208631

    Workspace: ORANGE

    User: guest

    Password: 01range

    My email: [email protected]

    Much appreciated!

    Jeroen van Meenen wrote:

    Then changed:

    VOX

    You should not use hgroup here. Leave that as a h1 element.

    • hgrouphas been removed from the W3C HTML specification.
    • With the help of hgroup of this way is non-compliant because it does not contain at least one child h1-h6 element.

    Although the CSS works well, I have two questions:

    1. the sides of the banner are blue instead of white

    The original blue background of the theme is actually applied to the containing header element, not the h1 (or hgroup in your example), it is the rule that must be overridden:

    header#uHeader {
      background: #fff;
    }
    

    2. the disconnect next to the user name button is hidden and only appears when you browse on

    The link to logout of the theme is white to contrast with the original blue background. What should be replaced by a dark to be visible on the new white foreground color, and a contrasting hover appearance applied:

    div.userBlock a:link,
    div.userBlock a:visited {
      color: #004F7C;
    }
    div.userBlock a:hover {
      background-color: #b6ceed;
      color: #fff;
    }
    
  • Change the background color of the program Committee

    Is it possible to change the background color of the Panel program? I don't see a setting for this in the preferences. At the moment it is a dark gray:

    screenshot_468.png

    I'd like to be able to change it to something like this (this is just a mock-up using a bright color randomly):

    screenshot_468.fw.png

    For example, when I change the scale property or the Position of the motion in the effect controls panel control, and this dark gray background color appears, I would like to be able to clearly identify where the edge of my clip is. Having a color light 'sneak out' would make that easier than now.

    If you click on the key in the program monitor you can set the background of the Photoshop transparency grid instead of black, this will help to reveal when you moved the clip and do not frame address (if that's what you're after):

    MtD

  • How to change the background color or the height of the titleWindow header?

    Hey guys... so I popup a titlewindow on click of a button, and I was wondering if tehre was a way I could change the background color of the header of the titlewindow...?

    (d) in Builder 4, paste the following code:


           
       

    Using the mouse, select 'TitleWindow' and right click and choose "Open Declaration of skin" in the context menu. That should open up toward the top of the skin in a new tab and you can copy and paste in a new skin file.

    (e) use Alex's excellent suggestion above:


       
       
           
       

    TitleWindow title bar area gets bigger, but if you want to close the button to align vertically, you'll probably want to custom skin even when change the constraint superior to Red = '0'.

    Peter

  • Background color for the radio button does not change during execution

    Hi everyone,

    I set the background color of shapes in blue in the formsweb.cfg file. I used 4 radio buttons in the form and at the time of execution, the background color of the option button is gray.

    So I used SET_ITEM_PROPERTY trigger to set the background color, but it is not chaning. It remains grey.

    SET_ITEM_PROPERTY('TRANS_MASTER.) MODE_OF_PAYMENT', BACKGROUND_COLOR, 'r90g117b148'); - Radio button group

    SET_ITEM_PROPERTY('TRANS_MASTER.) CASH', BACKGROUND_COLOR, 'r90g117b148'); - Radio button
    SET_ITEM_PROPERTY('TRANS_MASTER.) CREDIT_CARD', BACKGROUND_COLOR, 'r90g117b148'); - Radio button
    SET_ITEM_PROPERTY('TRANS_MASTER.) CREDIT_CUSTOMER', BACKGROUND_COLOR, 'r90g117b148'); - Radio button
    SET_ITEM_PROPERTY('TRANS_MASTER.) REDEEMVOUCHER', BACKGROUND_COLOR, 'r90g117b148'); - Radio button

    I used the RGB color as r90g117b148.

    Please help me,

    Thanks in advance,

    Published by: lola amrani may 5, 2010 07:56

    Hello

    When the desig, assign ownership of background color for group of Radio buttons and boxes option for

    François

  • background color affecting the browser of LabVIEW

    I want to use snapshots of the LabVIEW browser in some documents.  Is there a way to put the white background color of the browser?

    Earl

    Hi Earl,

    It is the great 'code capture tool' can be found here on the forum or on the LAVA.

    Just search for "CTC" to find threads like this...

  • Cannot delete the background color of the icons on the desktop in XP.

    I'm not able to remove the background color of the icons on the desktop in XP.

    I tried the following steps with no luck.

    1 Control Panel / System / Advanced / Performance tab / button settings and tick: shadows fall to use the desktop icon labels

    2. display properties-> Desktop-> Desktop Customize-> Web-> "Lock desktop items" and "my current Home Page" is not checked.

    Any suggestion would be appreciated...

    Thanks in advance.

    Naveen

    These links should help you:

    http://www.TomsHardware.com/Forum/25340-45-unable-remove-shadow-desktop-icons-Windows

    http://www.geekyard.com/OS/Windows/how-to-remove-desktop-icon-background-color/

Maybe you are looking for