Setting a buttons color

I have been trying to change the color of a flex button to
blue. If the canvas background is white, my button blends with the
white. What property can I set to stop this. All I want is a solid
blue button without having the background blend into it.
sammy

In the simplest of examples, does this not work on your
machine?
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
alpha="1.0" backgroundGradientAlphas="[1.0, 1.0]"
backgroundGradientColors="[#FFFFFF, #FFFFFF]" width="200"
height="200">
<mx:Button label="Button" fillAlphas="[1.0, 1.0]"
fillColors="[#1631F6, #1631F6]" color="#FFFFFF"/>
</mx:Application>

Similar Messages

  • How to set a HTML color to a control button

    How to set a fixed color to a disabled button?
    I have a boolean button which has 3 status: on, off and disabled. I don't like the 'grayed and disabled' option. I will use red for off, green for on, and white gray (foreground color) for the disabled status. The HTML color code is BDBDBD. I tried to send the hex number 'BDBDBD' to the button property node 'color[4]' but was told that I was wiring to the wrong type of terminal.
    Could any one post a sample code of how to construct the structure of 'color[4]' using a RRGGBB number?
    Thanks,
    Ryan

    What exectly do you want and do you see.
    If I run the code you have in LabVIEW 9.0, I get the following result after running.
    For convenience I have shown the second color array you set as color indicators:
    Note that you use grey as the colors for True and False
    Here I have set made the colors more distinct:
    Ton
    Message Edited by TCPlomp on 07-10-2009 08:00 AM
    Message Edited by TCPlomp on 07-10-2009 08:01 AM
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!
    Attachments:
    ButtonColor_FP.png ‏17 KB
    ButtonColorMoreColor_FP.png ‏18 KB

  • How can I set button colors from xml file data?

    I am reading an xml file to create a group of buttons. I am
    also using repeater to create the group of buttons.
    I am getting the buttons created, but am unable to set the
    fill color properly. I keep getting the error "Implicit coercion of
    a value of type String to an unrelated type Array" if I try to plug
    in r.currentItem.value, even when I used an Actionscript function
    to convert from a String to an array of 2 uints. Is there a simple
    type casting solution to this I'm just not getting?
    Any help would be greatly appreciated!
    The xml file has the following format:
    <colors>
    <color>
    <name>Canteloupe</name>
    <value>0xFFCC66</value>
    </color>
    <color>
    <name>Banana</name>
    <value>0xFFFF66</value>
    </color>
    <color>
    <name>Lemon</name>
    <value>0xFFFF00</value>
    </color>
    <color>
    <name>Honeydew</name>
    <value>0xCCFF66</value>
    </color>
    </colors>
    The code I have so far is:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    initialize="colors.send()" layout="absolute">
    <mx:HTTPService id="colors"
    url="assets/colors_standard.xml" resultFormat="e4x"/>
    <mx:XMLListCollection id="xlc_colors"
    source="{colors.lastResult.color}"/>
    <mx:TabNavigator left="0" top="0" right="0"
    bottom="0">
    <mx:Canvas label="Tab 1" width="100%" height="100%">
    <mx:Accordion width="200" left="0" top="0" bottom="0">
    <mx:Canvas label="Colors" width="100%" height="100%">
    <mx:Label text="Current Color Selection" left="10"
    right="10" top="10" height="20" fontWeight="bold"/>
    <mx:Button label="Update Colors" left="10" right="10"
    top="227" height="22" id="button_colors_update"/>
    <mx:Canvas height="189" left="10" right="10" top="30"
    borderStyle="outset" backgroundColor="#e9e9e9">
    <mx:Tile id="tile_standard" direction="horizontal"
    tileWidth="25" tileHeight="25" horizontalAlign="center"
    verticalAlign="middle" borderStyle="outset" left="10" right="10"
    top="10" height="134" backgroundColor="#ffffff">
    <mx:Repeater id="r" dataProvider="{xlc_colors}">
    <mx:Button toolTip="{r.currentItem.name}" height="15"
    width="15" x="10" y="10"/>
    </mx:Repeater>
    </mx:Tile>
    <mx:Button label="Additional Colors"
    id="button_colors_online" height="22" left="10" right="10"
    bottom="10"/>
    </mx:Canvas>
    </mx:Canvas>
    </mx:Accordion>
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:Application>

    Thanks atta707!
    If I send an array of 2 uints via a function call that
    converts from String to Number to uint in an Actionscript function
    and try to feed that into fillColors via:
    <mx:Script>
    <![CDATA[
    public function fillcolors (_colorvalue:String):uint {
    return uint(Number(_colorvalue));
    ]]>
    </mx:Script>
    <mx:Button height="15" width="15"
    toolTip="{r.currentItem.name}" x="10" y="10"
    fillColors="[fillcolors({r.currentItem.value}),fillcolors({r.currentItem.value})]"
    I still get the "Implicit coercion of a value of type String
    to an unrelated type Array." on the line that creates the button. I
    have tried returning an Array of two uints with the Actionscript
    funtion and get the same result.
    <mx:Script>
    <![CDATA[
    public function fillcolors (_colorvalue:String):Array {
    return new Array(uint(Number(_colorvalue)),
    uint(Number(_colorvalue)));
    ]]>
    </mx:Script>
    <mx:Button toolTip="{r.currentItem.name}" height="15"
    width="15" x="10" y="10"
    fillColors="[fillcolors({r.currentItem.value})]"/>
    Am I mistaken in my conversion of r.currentItem.value to
    fillColors as arguments? Sorry about the newbie question - the
    error I get makes me think it is a type conversion issue, but I
    can't seem to get this to work/compile. If fillColors is expecting
    an Array, should the Actionscript function returning an Array at
    least get this to compile?

  • Using different color sets for button in one menu

    Hi!
    In DVDSP4 you can have three different sets of color mapping for your menu buttons.
    I'm using TIFFs as backgrounds and a simple black/white TIFF for overlay. I do want to use different colors for my buttons in the same menu. Can I do this with a black/white overlay, or do I have to use an overlay with (four different) colors? My wish is to be able to create one or two color sets and just assigning any of them to one or more buttons in one menu.
    G4 Dual, FCP5, DVDSP4, BitVice, Soundtrack Pro   Mac OS X (10.4.3)   2 GB RAM, SuperDrive

    One Overlay is fine
    What you need to do is set up the color sets in Inspector and assign them to the different buttons. Take a look for "Color Mapping Sets" in the PDF where it details how to do it (PG 219 in DVD SP 3, PG 238 DVD SP 4). Note that it works for selected and activated states for the buttons, not normal state.
    Also note, at least for me anyway, this has always been a buggy feature where sometimes it works properly and sometimes it does not. Never figured out why why either, but sometimes it does not flag the proper set to be used

  • How to set a background color to view

    Hi All,
              i creared a view with 2 textboxes and a button.These elements are in TransparentContainer.I set the background color to the TransparentContainer.By setting color to the TransparentContainer it is comming at the center and the 4 sides of it is displaying in the normal background color of the browser
    i didnt find any color options for the view called RootUIElementContainer.the width and height of the view are setted to the browser means 1024*768.
    Just like sap editor which we get by the link https://www.sdn.sap.com i want to get my view .....
    I want to set color to this RootUIElementContainer element which effect the whole view...not the containers or groups which i add under this RootUIElementContainer
    Regards
    Padma N

    hi Padma,
    For changing the background colour you will have to make the change in the theme.
    You can download the theme editor plugin for eclipse from SDN. With this plugin, you can make changes to the default themes , save as a new theme
    Or if you are using portal, then goto system administrator, theme editor, select SAP Streamline and change the color in Screen areas -> application, then save the theme with different name.
    Best regards,
    Sangeeta

  • Can I set the text color in a Label?

    Hi everyone ~
    Can I set the font color in PP? I only found that there is a "setBackground".. but I want to set the color within a Label.
    Thanks!
    Gary

    Fixed it!
    There was a global style for s|Label and since the Spark button uses one of these for the text, that was it.

  • Change pressed button Color

    Hi,
    I want to change my pressed button Color and I haven't been able to find a way, I tried creating my own button and add a listener when it is pressed and then change its background color but it doesn't work! it works for enter and exit but not for pressed and released.
    any one has an idea?
    thanks
    Here's my code:
    package components;
    import javax.swing.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseAdapter;
    import java.awt.*;
    * JButton con una nueva propiedad de Color presionado
    * @author Ana Mar�a Franco
    * @version 1.0
    public class PressedColorButton extends JButton
        // Atributos ************************************************************************
        private Color unpressedButtonColor;
        private Color pressedButtonColor;
        // Constructores ********************************************************************
        public PressedColorButton()
            super();
            this.addMouseListener(new PressedColorButton_this_mouseAdapter(this));
        // M�todos **************************************************************************
         * Obtiene el color sin presionar
         * @return Color
        public Color getUnpressedButtonColor()
            return this.unpressedButtonColor;
         * Define el color sin presionar
         * @param nuevoColor Color
        public void setUnpressedButtonColor(Color nuevoColor)
            this.unpressedButtonColor = nuevoColor;
         * Obtiene el color presionado
         * @return Color
        public Color getPressedButtonColor()
            return this.pressedButtonColor;
         * Define el color presionado
         * @param nuevoColor Color
        public void setPressedButtonColor(Color nuevoColor)
            this.pressedButtonColor = nuevoColor;
        public void this_mouseExited(MouseEvent e)
            this.setBackground(unpressedButtonColor);
        public void this_mousePressed(MouseEvent e)
            this.setBackground(pressedButtonColor);
        public void this_mouseReleased(MouseEvent e)
            this.setBackground(unpressedButtonColor);
        public void this_mouseEntered(MouseEvent e)
            this.setBackground(pressedButtonColor);
    // Escuchadores *************************************************************************
    class PressedColorButton_this_mouseAdapter extends MouseAdapter
        private PressedColorButton adaptee;
        PressedColorButton_this_mouseAdapter(PressedColorButton adaptee)
            this.adaptee = adaptee;
        public void mouseExited(MouseEvent e)
            adaptee.this_mouseExited(e);
        public void mousePressed(MouseEvent e)
            adaptee.this_mousePressed(e);
        public void mouseReleased(MouseEvent e)
            adaptee.this_mouseReleased(e);
        public void mouseEntered(MouseEvent e)
            adaptee.this_mouseEntered(e);
    }

    Swing related questions should be posted in the Swing forum. Try setting the following properties on the button:
    setContentAreaFilled( false );
    setOpaque(true);

  • New button colors hard to see

    The new light gray colors are now rather difficult to see at a glance which one is greyed out and which one is active. It is so bad that I even looked at the Universal Access System Prefs pane and bumped up the contrast but even that doesn't seem to help. Why on Earth did anyone thing this was a good idea or makes the interface more appealing in any way? Or more importantly, is there a way to bring back the old button colors?

    Most likely your home button is worn out. There is really nothing that you can do, it's just usual wear and tear. You could set up a repair through Apple. Your phone is probably out of warrany if you don't have a plan set up on your phone. You could do a repair through Apple, get a third party to repair it, or pony up and get the iPhone 5!

  • Scripts for setting mail message colors quickly

    I've been frustrated at how difficult it is to set the color of a message subject etc in a mailbox. Sometimes applying a color would work, sometimes not, and many clicks required. Finally I wrote a simple script that appears in the Finder's Scripts menu, which applies a particular color to all emails that are selected. I made one version for each color I use (I use these to keep track of emails that are useful references, or that require some action, etc.) I added a leading space to the script names so they would appear at the top of the scripts menu. I wish I could connect them to buttons in the Mail window, but don't know a way to do that, and this is nearly as conveniet.
    Here's one of the scripts. Colors can be none, red, orange, blue, gray, green, purple, yellow:
    tell application "Mail"
    set selectedMessages to selection
    set nm to count of selectedMessages
    if (nm) is equal to 0 then
    display alert "No Messages Selected" message "Select the message(s) you want to color red before running this script."
    else
    repeat with nn from 1 to nm by 1
    set theMessage to item nn of selectedMessages
    set the background color of theMessage to red
    end repeat
    end if
    end tell

    HI Disha
    Check out these links. They will surely help
    http://www.geocities.com/mpioud/Z_EMAIL_ABAP_REPORT.html
    http://www.thespot4sap.com/Articles/SAP_Mail_SO_Object_Send.asp
    If you find this answer useful, please reward me for the same.
    Good luck
    Karthik Potharaju

  • Wallpaper, kbfx menu buttons, color scheme

    Over time I've been dabbling a bit with my arch install and recently started playing with apearence. Thought I would share a few of my graphics for kde. Although, my tastes might be a little weird compared to most!
    Here is my wallpaper, basically I just modified it from an old arch wallpaper...
    http://my.opera.com/allisonleigh/albums … re=3262852
    here is a color scheme and preview for kde, and some kbfx menu buttons I made using the arch logo, although one set of buttons uses the Chinese version of the word start, but you could easily modify them. The color scheme along with smi-transparency on menus, I think looks totally awsome over the wallpaper..
    http://my.opera.com/allisonleigh/blog/2 … n-computer
    I have a bunch of icons I made, but im too far away from having a full set, and they're kind of geared twards a Chinese system.
    I thought about sharing some of my helper scripts I made, but even though they make my life easier, I decided they're too weird for sharing...
    Last edited by Leigh (2007-03-10 20:23:03)

    The icons on top of your screenshot (except the firefox one) are made by you?
    I like them, kinda clean... Why not release them on kde-look? There are a lot of "unfinished" icon themes available (just in the spirit of ESR) on this site.
    Well, the color scheme is indeed a little bit weird reminds me of my old commodore times somehow, but you could also share your kbfx buttons on kde-look, i bet there will be some chinese archers who like them...

  • Can't set up irssi colors

    I'm feeling really... stupid. I just can't set up irssi colors, almost ashame for asking advice on this
    Here's my theme (just cloned the default theme):
    # When testing changes, the easiest way to reload the theme is with /RELOAD.
    # This reloads the configuration file too, so if you did any changes remember
    # to /SAVE it first. Remember also that /SAVE overwrites the theme file with
    # old data so keep backups :)
    # TEMPLATES:
    # The real text formats that irssi uses are the ones you can find with
    # /FORMAT command. Back in the old days all the colors and texts were mixed
    # up in those formats, and it was really hard to change the colors since you
    # might have had to change them in tens of different places. So, then came
    # this templating system.
    # Now the /FORMATs don't have any colors in them, and they also have very
    # little other styling. Most of the stuff you need to change is in this
    # theme file. If you can't change something here, you can always go back
    # to change the /FORMATs directly, they're also saved in these .theme files.
    # So .. the templates. They're those {blahblah} parts you see all over the
    # /FORMATs and here. Their usage is simply {name parameter1 parameter2}.
    # When irssi sees this kind of text, it goes to find "name" from abstracts
    # block below and sets "parameter1" into $0 and "parameter2" into $1 (you
    # can have more parameters of course). Templates can have subtemplates.
    # Here's a small example:
    # /FORMAT format hello {colorify {underline world}}
    # abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; }
    # When irssi expands the templates in "format", the final string would be:
    # hello %G%Uworld%U%n
    # ie. underlined bright green "world" text.
    # and why "$0-", why not "$0"? $0 would only mean the first parameter,
    # $0- means all the parameters. With {underline hello world} you'd really
    # want to underline both of the words, not just the hello (and world would
    # actually be removed entirely).
    # COLORS:
    # You can find definitions for the color format codes in docs/formats.txt.
    # There's one difference here though. %n format. Normally it means the
    # default color of the terminal (white mostly), but here it means the
    # "reset color back to the one it was in higher template". For example
    # if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would
    # print yellow "foo" (as set with %Y) but "bar" would be green, which was
    # set at the beginning before the {foo} template. If there wasn't the %g
    # at start, the normal behaviour of %n would occur. If you _really_ want
    # to use the terminal's default color, use %N.
    # default foreground color (%N) - -1 is the "default terminal color"
    default_color = "-1";
    # print timestamp/servertag at the end of line, not at beginning
    info_eol = "false";
    # these characters are automatically replaced with specified color
    # (dark grey by default)
    replaces = { "[]=" = "%K$*%n"; };
    abstracts = {
    ## generic
    # text to insert at the beginning of each non-message line
    line_start = "%B-%n!%B-%n ";
    # timestamp styling, nothing by default
    timestamp = "%K$*%n";
    # any kind of text that needs hilighting, default is to bold
    hilight = "%_$*%_";
    # any kind of error message, default is bright red
    error = "%R$*%n";
    # channel name is printed
    channel = "%_$*%_";
    # nick is printed
    nick = "%_$*%_";
    # nick host is printed
    nickhost = "[$*]";
    # server name is printed
    server = "%_$*%_";
    # some kind of comment is printed
    comment = "[$*]";
    # reason for something is printed (part, quit, kick, ..)
    reason = "{comment $*}";
    # mode change is printed ([+o nick])
    mode = "{comment $*}";
    ## channel specific messages
    # highlighted nick/host is printed (joins)
    channick_hilight = "%C$*%n";
    chanhost_hilight = "{nickhost %c$*%n}";
    # nick/host is printed (parts, quits, etc.)
    channick = "%c$*%n";
    chanhost = "{nickhost $*}";
    # highlighted channel name is printed
    channelhilight = "%c$*%n";
    # ban/ban exception/invite list mask is printed
    ban = "%c$*%n";
    ## messages
    # the basic styling of how to print message, $0 = nick mode, $1 = nick
    msgnick = "%K<%y$0%n$1-%K>%n %|";
    # message from you is printed. "msgownnick" specifies the styling of the
    # nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the
    # whole line.
    # Example1: You want the message text to be green:
    # ownmsgnick = "{msgnick $0 $1-}%g";
    # Example2.1: You want < and > chars to be yellow:
    # ownmsgnick = "%Y{msgnick $0 $1-%Y}%n";
    # (you'll also have to remove <> from replaces list above)
    # Example2.2: But you still want to keep <> grey for other messages:
    # pubmsgnick = "%K{msgnick $0 $1-%K}%n";
    # pubmsgmenick = "%K{msgnick $0 $1-%K}%n";
    # pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n";
    # ownprivmsgnick = "%K{msgnick $*%K}%n";
    # privmsgnick = "%K{msgnick %R$*%K}%n";
    # $0 = nick mode, $1 = nick
    ownmsgnick = "{msgnick $0 $1-}";
    ownnick = "%_$*%n";
    # public message in channel, $0 = nick mode, $1 = nick
    pubmsgnick = "{msgnick $0 $1-}";
    pubnick = "%N$*%n";
    # public message in channel meant for me, $0 = nick mode, $1 = nick
    pubmsgmenick = "{msgnick $0 $1-}";
    menick = "%Y$*%n";
    # public highlighted message in channel
    # $0 = highlight color, $1 = nick mode, $2 = nick
    pubmsghinick = "{msgnick $1 $0$2-%n}";
    # channel name is printed with message
    msgchannel = "%K:%c$*%n";
    # private message, $0 = nick, $1 = host
    privmsg = "[%R$0%K(%r$1-%K)%n] ";
    # private message from you, $0 = "msg", $1 = target nick
    ownprivmsg = "[%r$0%K(%R$1-%K)%n] ";
    # own private message in query
    ownprivmsgnick = "{msgnick $*}";
    ownprivnick = "%_$*%n";
    # private message in query
    privmsgnick = "{msgnick %R$*%n}";
    ## Actions (/ME stuff)
    # used internally by this theme
    action_core = "%_ * $*%n";
    # generic one that's used by most actions
    action = "{action_core $*} ";
    # own action, both private/public
    ownaction = "{action $*}";
    # own action with target, both private/public
    ownaction_target = "{action_core $0}%K:%c$1%n ";
    # private action sent by others
    pvtaction = "%_ (*) $*%n ";
    pvtaction_query = "{action $*}";
    # public action sent by others
    pubaction = "{action $*}";
    ## other IRC events
    # whois
    whois = "%# $[8]0 : $1-";
    # notices
    ownnotice = "[%r$0%K(%R$1-%K)]%n ";
    notice = "%K-%M$*%K-%n ";
    pubnotice_channel = "%K:%m$*";
    pvtnotice_host = "%K(%m$*%K)";
    servernotice = "%g!$*%n ";
    # CTCPs
    ownctcp = "[%r$0%K(%R$1-%K)] ";
    ctcp = "%g$*%n";
    # wallops
    wallop = "%_$*%n: ";
    wallop_nick = "%n$*";
    wallop_action = "%_ * $*%n ";
    # netsplits
    netsplit = "%R$*%n";
    netjoin = "%C$*%n";
    # /names list
    names_prefix = "";
    names_nick = "[%_$0%_$1-] ";
    names_nick_op = "{names_nick $*}";
    names_nick_halfop = "{names_nick $*}";
    names_nick_voice = "{names_nick $*}";
    names_users = "[%g$*%n]";
    names_channel = "%G$*%n";
    # DCC
    dcc = "%g$*%n";
    dccfile = "%_$*%_";
    # DCC chat, own msg/action
    dccownmsg = "[%r$0%K($1-%K)%n] ";
    dccownnick = "%R$*%n";
    dccownquerynick = "%_$*%n";
    dccownaction = "{action $*}";
    dccownaction_target = "{action_core $0}%K:%c$1%n ";
    # DCC chat, others
    dccmsg = "[%G$1-%K(%g$0%K)%n] ";
    dccquerynick = "%G$*%n";
    dccaction = "%_ (*dcc*) $*%n %|";
    ## statusbar
    # default background for all statusbars. You can also give
    # the default foreground color for statusbar items.
    sb_background = "%4%w";
    # default backround for "default" statusbar group
    #sb_default_bg = "%4";
    # background for prompt / input line
    sb_prompt_bg = "%n";
    # background for info statusbar
    sb_info_bg = "%8";
    # background for topicbar (same default)
    #sb_topic_bg = "%4";
    # text at the beginning of statusbars. sb-item already puts
    # space there,so we don't use anything by default.
    sbstart = "";
    # text at the end of statusbars. Use space so that it's never
    # used for anything.
    sbend = " ";
    topicsbstart = "{sbstart $*}";
    topicsbend = "{sbend $*}";
    prompt = "[$*] ";
    sb = " %c[%n$*%c]%n";
    sbmode = "(%c+%n$*)";
    sbaway = " (%GzZzZ%n)";
    sbservertag = ":$0 (change with ^X)";
    sbnickmode = "$0";
    # activity in statusbar
    # ',' separator
    sb_act_sep = "%c$*";
    # normal text
    sb_act_text = "%c$*";
    # public message
    sb_act_msg = "%W$*";
    # hilight
    sb_act_hilight = "%M$*";
    # hilight with specified color, $0 = color, $1 = text
    sb_act_hilight_color = "$0$1-%n";
    It's almost the way I want it, but a couple of things:
    - I want everyone nickname but mine in gray
    - I want the join/quit text (... has joined/quit) in gray
    - I want the mode (@, +, etc) in yellow
    I tried to format the text according irssi site, but without luck.
    For example tried this to change others nickname color:
    pubmsgnick = "{msgnick %y$0%n %K$1%n-}";
    pubnick = "%K$*%n";
    and this for the quit msg
    # mode change is printed ([+o nick])
    mode = "{comment %K$*%n}";
    # nick/host is printed (parts, quits, etc.)
    channick = "%c$*%n";
    chanhost = "{nickhost %c$*%n}";
    all without any luck. Also tried to put the format strings outside the curly braces, with the same result. I've been editing the config file for a while now, not sure what other information could you possibly need.
    I know it's not a big deal, I stil can use the program with no hassle, but it would really be nice to set the colors like that, to help me distinguish between lines.
    Thank you for reading, and sorry for my lousy english

    Nobody can tell you anything without proper system info or other technical details.
    Mylenium

  • Help with getting button color.

    I'm trying to make a little paint program. i want to be able to click on a color button and then assign the color of that button to a variable Color brushColor.
    funny thing is, when i compile this, it tells me that
    C:\java\javaprograms\TryPainting.java:21: getBackground() in java.awt.Component cannot be applied to (java.awt.Button)
              brushColor = paintTheBrush(getBackground(source));
    strange, getBackground is explicitly listed as a method that Button inherits from Component in the API.
    any suggestions on a way to accomplish this?
    thanks in advance,
    jason
    ------code follows-------
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.*;
    import java.awt.event.*;
    //colored buttons of "paint"
    class OilPaint extends Button{
    Color brushColor = Color.white;
    OilPaint(String label, Color color) {
         setLabel(label);
         setForeground(color);
         setBackground(color);
         addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent e) {
         Button source = (Button)e.getSource();
         brushColor = getBackground(source);
         public Color paintTheBrush(Color color) {
              return color;
    // canvas to paint on - this isn't working yet. can't even get the
    // setSize to work, though it does compile.
    class Canvas extends JPanel{
         Canvas(){
              setBackground(Color.white);
              Dimension canSize = new Dimension(300,300);
              setSize(canSize);
    // displays the lsit of color button choices in a small panel at bottom
    // of window
    class ColorChoices extends JPanel{
         ColorChoices() {
              setBackground(new Color(220,255,255));
              add(new OilPaint("paint",Color.blue));
              add(new OilPaint("paint",Color.red));
              add(new OilPaint("paint",Color.green));
              add(new OilPaint("paint",Color.white));
              add(new OilPaint("paint",Color.black));
    //this is the main class of the program TryPainting.java
    class TryPainting {
         public static void main(String[] args) {
              JFrame window = new JFrame();
              Toolkit toolkit = window.getToolkit();
              Dimension winSize=toolkit.getScreenSize();
              window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              window.setBounds(5,5,winSize.width/2,winSize.height/2);
              Container content = window.getContentPane();
              content.setLayout(new BorderLayout());
              content.add("North",new Canvas());
              content.add("South",new ColorChoices());
              window.setVisible(true);

    duh.. thanks man, that did the trick. i'm pretty new at this. i really appreciate the help. i got stuck thinking of the getBackground() as a function, rather than a method. this oop stuff is wacky weird fun!
    jason

  • Dynamically Set Subreport Background Color to the Same Value as Main Report Background Color

    I have a report that contains a subreport.  The main report has groupings in it.  I am dynamically setting the background color of the group rows based on an expression.  That part is working fine.  The problem that I am having is that
    I don't know how to get the subreport to "inherit" the background color of the grouping that holds it.
    Basically, I have different row shadings on my report differentiating the groupings except for the rows where the subreport shows.
    How do I go about setting the subreport background color to equal it's contaiing grouping's background color?  Thanks in advance for any and all assistance provided.

    The parameter method given by gpshukla will send the info to the subreport, but you don't need the color parameter in the main report, only the subreport. The trick is in setting the value of that parameter.
    Right-click the cell with the embedded subreport, you can select subreport properties.
    Select Parameters and add a parameter.
    The name column is the name of the parameter in the subreport (color) and value is the value to set it to.
    Set name to "color" (no quotes).
    Set Value to the same expression used to set the background color for the row.
    In the subreport, click the design surface to select the report (not header or footer).
    In the properties pane, select background color and choose expression from the dropdown.
    Type =Parameters!color.Value into the expression builder.
    This will work assuming that background color in the main report row will not change without also refreshing the subreport.
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • How can i set the alternating colors for a table rows

    Dear All,
    Please any one help me how can i set the Alternating colors for Table Rows.
    i created a theam there i set the background alternating color to brown and i set the table design properity to alternating. but it is not reflecting.

    Hi,
    The design property in Table properties should work for your requirement. Select "alternating" value for design.
    Please see the API below:
    design
    Determines the appearance of the table. The property design can take the following values and is represented by enumeration type WDTableDesign.
    alternating - The table rows are displayed alternately in a different color.
    standard - The table background has one color. The individual table rows are displayed with grid net lines.
    transparent - The table background is transparent. The individual table rows are displayed without grid net lines.
    Check whether you have changed the right property or not? Also table should contain more than one rows to test this scenario.
    Regards,
    Jaya.
    Edited by: VJR on Jun 17, 2009 6:43 PM

  • Can I invoke a SubVI in an event? and how do I set the background color of a pipe to #0000ff?

    When I click an image or a glass pipe(which belongs to Industry/Chesmitry category in palette), I want a SubVI to be invoked.
    The purpose is to fetch an OPC-UA data from a web service and to write to it via the service.
    We are building an HMI solution which displays an interactive water plant diagram.
    When users click pipes and motors in the diagram, clicked devices should be turned on and off and change their animations or colors accordingly.
    OPC-UA is for communication with devices.
    I couldn't even set the background color of a pipe to "#0000ff", but setting it to "Red" or "Blue" was possible, and I don't know how to invoke SubVIs in event scripts.
    The documentations in NI.com are confusing and lack depth.
    Even silverlight references are confusing.
    How do I do all of these?

    Hi iCat,
    Can you provide some more information about your current implementation so that we can help to answer your questions. Some questions I have for you are:
    Are you creating this project in the NI LabVIEW Web UI Builder or in LabVIEW?
    How are you publishing your webservice? Is this also in LabVIEW?
    How is your webservice interacting with an OPC-UA server?
    How is the certification set up with OPC-UA so that you can communicate between the server and the client?
    Best Regards,
    Allison M.
    Applications Engineer
    National Instruments
    ni.com/support

Maybe you are looking for

  • Bookmark 'Open in new Tab' or 'Window' doesn't on this latest install

    Right clicking on a bookmark, allows me to open link in a new tab or window.... this works for the first while, but then breaks down and doesn't open anything. Restarting FF 4.0 works to resolve this issue. But lately after a half hour of working pro

  • How to Store word doc in java using oracle

    hi my name is jagapathi raju i am working in Niit LTD can any one tell me how to store A word doc in oracle using java

  • Safari Restoring After Restart With Dual Monitors

    I'm on 10.9.4 and for the last few versions of Marvericks, when rebooting Safari never restores itself to the monitor i left it on. It seems to restore to the default. Other than Skype, no other apps exhibit this. I see no other issues with Safari. A

  • I reported this over a month ago, and still no response.  Can anyone help?

    I bought a song in iTunes on my iPod Touch. It's a Second Generation, if that helps any. When I downloaded it and listened to it; however, I noticed that it wasn't the right song! iTunes had mislabeled it. I reported it to Apple more than a month ago

  • IChat AV HELP!!!!

    Please help me, I am trying to have a video conference with my boyfriend because he lives across the country. My issue is when we try to connect with video chat, he gets the prompt asking him, but when he clicks accept, it gives me a message, "User d