Search Results

Search found 11147 results on 446 pages for 'background foreground'.

Page 27/446 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Unable to change background colour for JOptionPane

    - by Sunil Kumar Sahoo
    Hi I have created sample progeam which will give same look and feel of a confirm dialog and set the background colour as red. But I donot know what is the problem that my background colour of option is displayed as the default colour but not red. also i need same look and feel of confirm dialog across all platforms. Here is the code that I have written. please help me to solve the issue public class JOptionPaneBackground { public static void main(String[] args) throws Exception { // UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); UIDefaults uiDefaults = UIManager.getLookAndFeelDefaults(); List<Object> keys = new ArrayList<Object>(uiDefaults.keySet()); Collections.sort(keys, new Comparator<Object>() { public int compare(Object o1, Object o2) { return (o1.toString()).compareTo(o2.toString()); } }); for (Object key : keys) { System.out.println(String.format("%-40s = %s", key, uiDefaults.get(key))); } UIManager.put("OptionPane.background", Color.red); UIManager.put("Panel.background", Color.red); JOptionPane.showConfirmDialog(null, "Hello World!"); } }

    Read the article

  • LI Background Images (.PNG) not appeared in IE6

    - by Balkar
    Hi I am using the following CSS but it never shows background images in IE6. But if I remove the filter .. AlphaLoader command, then it shows with grey background. Here is my CSS Code .fg-block1 ul, .fg-block3 ul { list-style:none; } .fg-block1 ul li, .fg-block3 ul li { padding-left:28px; background:url(images/bullet-2.png) no-repeat left top; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:11px; border-bottom:1px dotted #fff; text-align:left; background-position:1px 0; line-height:16px; padding-bottom:5px; margin-bottom:5px; } .fg-block3 ul li { border-bottom:none; } .fg-block1 ul li a, .fg-block3 ul li a { color:#fff; text-decoration:none; } .fg-block1 ul li a:hover, .fg-block3 ul li a:hover { color:#fff; text-decoration:underline; }

    Read the article

  • HTML + CSS: fixed background image and body width/min-width (including fiddle)

    - by insertusernamehere
    So, here is my problem. I'm kinda stuck at the moment. I have a huge background image and content in the middle with those attributes: content is centered with margin auto and has a fixed width the content is related to the image (like the image is continued within the content) this relation is only horizontally (vertically scrolling moves everything around) This works actually fine (I'm only talking desktop, not mobile here :) ) with a position fixed on the huge background image. The problem that occurs is the following: When I resize the window to "smaller than the content" the background image gets it width from the body instead of the viewport. So the relation between content and image gets lost. Now I have this little JavaScript which does the trick, but this is of course some overhead I want to avoid: $(window).resize(function(){ img.css('left', (body.width() - img.width()) / 2 ); }); This works with a fixed positioned image, but can get a litty jumpy while calculating. I also tried things like that: <div id="test" style=" position: absolute; z-index: 0; top: 0; left: 0; width: 100%: height: 100%; background: transparent url(content/dummy/brand_backgroud_1600_1.jpg) no-repeat fixed center top; "></div> But this gets me back to my problem described. Is there any "script-less", elegant solution for this problem? UPDATE: now with Fiddle The one I'm trying to solve: http://jsfiddle.net/insertusernamehere/wPmrm/ The one with Javascript that works: http://jsfiddle.net/insertusernamehere/j5E8z/ NOTE The image size is always fixed. The image never gets scaled by the browser. In the JavaScript example it get's blown. So don't care about the size.

    Read the article

  • custom grid style in silverlight 4

    - by Archie
    Hello, I want to set background of a grid using a style. I style I'm setting the Background Property of the grid. But I have a border filled with LinearGradientFill and a Path which also has LinearGradientFill in it. But I'm not able to combine both. Below is sample code. I want to create it as a style. <Grid> <Border BorderBrush="Black" BorderThickness="2"> <Border.Background> <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"> <GradientStop Color="Black" Offset="0.953" /> <GradientStop Color="White" Offset="0" /> </LinearGradientBrush> </Border.Background> </Border> <Path Data="M 0,0 C 0,620 10,10 560,0" Height="60" VerticalAlignment="Top"> <Path.Fill> <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5"> <GradientStop Color="Black" Offset="0" /> <GradientStop Color="White" Offset="0.779" /> </LinearGradientBrush> </Path.Fill> </Path> </Grid> It gives me an error as The Property 'Value' is set more than once. Can anyone help me with it? Thanks.

    Read the article

  • floating div problem in IE7

    - by Onur
    I'm trying to use a second background image with a floated div but it doesn't work in IE6 & 7 I'm aware that the floating div's is a pain in * in IE7 and lower versions but I really need to make it work. here is the code I'm using <body style="background-color:#FFFFFF; margin-top:0px; margin-right:0px;" topmargin="0" rightmargin="0" leftmargin="0"> <div id="bg2" style="float:right; top:0px; width:450px; height:151px; margin-right:0px; padding-right:0px; font-size:1px; overflow:visible; background-image:url(images/back2.jpg);"></div> <center> <div style="position:relative; top:0px; width:1050px; margin:0px; padding:0px; vertical-align:top; text-align:left;"> ....(huge div container)... I also tried to remove width attribute from the div which contains 2nd background image, then get the windows size and add the difference to the container div as left attribute with Jquery. It worked fine in all IE versions but this time not on Chrome here is a print screen any ideas please?

    Read the article

  • Changing url of background image

    - by João Pedro
    I'm doing this interface where I have a lot of buttons that are just a li with a background image like this #menu ul.icons li.nove { background-image:url(images/edit-menu/icons/undo.png); background-size:contain; display:block; margin-top:29px; } <ul class="icons"> <li class="um"></li> <li class="dois"></li> <li class="tres"></li> <li class="quatro"></li> <li class="cinco"></li> <li class="seis"></li> <li class="sete"></li> <li class="oito"></li> <li class="nove"></li> <li class="dez"></li> </ul> I need to create a code where I change the background image of the button when the user clicks it, to show that button its activated, I just need to change url(images/edit-menu/icons/ to url(images/edit-menu/select/ and keep the same filename. I need a way to do this dynamically so I won't have to do it for each of the 10 buttons. Hope I was clear, thanks in advance

    Read the article

  • jQuery Syntax Error - Trying to detect viewport size and select background image to use w/CSS

    - by CuppyCakes
    Hi all. Please be gentle, I'm still learning. I imagine that the solution to my problem is simple and that perhaps I have just been in front of the computer too long. I am trying to detect the size of the viewport, and then use a different sized image for a background on an element depending on the size of the viewport. Here is what I have so far: $(document).ready(function(){ var pageWidth = $(window).width(); if ( pageWidth <= 1280 ) { $('#contact').css('background-image', 'url(../images/contact_us_low.jpg)'); } elseif ( pageWidth > 1280 ) { $('#contact').css('background-image', 'url(../images/contact_us_high.jpg)'); } }); Error: missing ; before statement [Break on this error] elseif ( pageWidth 1280 ) {\n (Line 7) To me it seems like all of my semi-colons are in the right place. Two questions: Am I going about solving the problem in a sensible way? To me a simple conditional should solve this background problem, as the code is merely selecting between two images based on what size it detects the viewport to be. Can you please help point out my n00b syntax error? Sometimes it really does help to have an extra pair of eyes look at something like this, even if small. Thank you kindly for your advice, I will continue poking and perusing the docs I have available to me.

    Read the article

  • Background image is not displaying in IE6 and IE7

    - by saorabh
    I Have 3 divs HTML MARKUP <div class="top-content-wrapper"></div> <div id="content-wrapper"> </div> <div class="bottom-content-wrapper"> </div> Applied CSS on .top-content-wrapper { background:url("img/white-box-top-bg.gif") no-repeat scroll left top transparent; height:10px; margin:0 auto; padding:0 30px; width:686px; } #content-wrapper { background:url("img/white-box-middle-bg.gif") repeat-y scroll left top transparent; margin:0 auto; padding:10px 25px 70px; width:696px; } .bottom-content-wrapper { background:url("img/white-box-bottom-bg.gif") no-repeat scroll left top transparent; height:53px; margin:0 auto; padding:0 30px; width:686px; } In all major browsers its working fine but in IE6 and iE7 the background is not displaying please help me. Thank you.

    Read the article

  • CSS - background-size: cover; not working in Firefox

    - by Jayant Bhawal
    body{ background-image: url("./content/site_data/bg.jpg"); background-size: cover; background-repeat: no-repeat; font-family: 'Lobster', cursive; } Check: http://demo.jayantbhawal.in on firefox browsers, NOT in widescreen mode. The code works on Chrome(Android + PC) and even the stock Android browser, but NOT Firefox(Android + PC). Is there any good alternative to it? Why is it not working anyways? Googled this issue a lot of times, but no one else seems to have this problem. Is it just me? In any case, how do I fix it? There are quite some questions on SO about it too, but none of them provide a legitimate solution, so can someone just tell me if they have background-size: cover; issues on firefox too? So basically tell me 3 things: 1. Why is it happening? 2. What is a good alternative to it? 3. Is this happening to you too? On Firefox browsers of course. Chrome Version 35.0.1916.114 m Firefox Version 29.0.1 Note: I may already be trying to fix it so at times you may see a totally weird page. Wait a bit and reload.

    Read the article

  • iPhone SDK File Handler with iOS 4 Background Processes

    - by David Higgins
    The "application:applicationDidFinishLaunchingWithOptions:" message does not get called when an application is sitting in the background in iOS 4, and I'm trying to figure out how to be notified when the application is brought back into the foreground by another application. My application registers itself as a handler for certain file types, and Safari and other supported applications allow passing the files over to my app. This works great if the app is closed before I try to use it, but fails otherwise. In my application:applicationDidFinishLaunchingWithOptions: I have: NSURL *url = (NSURL *)[launchOptions valueForKey:UIApplicationLaunchOptionsURLKey]; if([url isFileURL]) { } [self.window makeKeyAndVisible]; return YES; As stated already, this works great so far for starting the app when it's not sitting in the background - but when I switch back over to Safari or Mail and try to open a new file that is supported, my application wakes up from the background and becomes active again but I can't see any "withOptions" overrides for application:applicationWillEnterForeground: or any way to identify what was passed in when it enters the foreground. What would be the appropriate way to receive these "open file notifications" when the application is in the background?

    Read the article

  • Background-image is not displaying in Firefox

    - by goa
    Strange thing happens. Background-image is not displaying in Firefox under some versions of WindowsXP and Windows Vista, but displays in Firefox under Mac OSX. It also displays in IE. This is CSS: .cherry_banner { background: url("library/media/images/cherry_banner_top.png") no-repeat; width: 276px; display:block; min-height:100px; padding-top: 13px; color: #fdfdfd; margin-bottom:20px; } .cherry_banner a { color: #fdfdfd; } .cherry_banner a:hover { text-decoration:underline; } .cherry_banner li { list-style-type:none; } .cherry_banner h2 { font-size: 18px; margin-bottom: 10px; } .chb_text1 { background: url("library/media/images/cherry_banner_pixel.png") repeat-y; } .chb_text2 { background: url("library/media/images/cherry_banner_bottom.gif") bottom no-repeat; padding: 4px 14px 24px 25px; } And this is html: <div id="linkcat-8" class="cherry_banner tpt"><div class="chb_text1"><div class="chb_text2"> <h2>??? ?????????</h2> <ul class='xoxo blogroll'> <li><a href="http://inveda.ru/jyotish/naksatra-calendar/">???????? ?????????? ?????????????? ????????? ????????????? ??? ?? 2010?.</a></li> </ul> </div></div></div> You can see on http://www.inveda.ru - right column - red banner.

    Read the article

  • IE 6 and 7 background inheritance problem, how do I solve this?

    - by Evilalan
    When I'm trying to create a rounded shaded box it works fine on FF and IE8 but on IE6 and IE7, any div inside the box gets the last background but if you set that all divs on the level where there should not be a background have background:none it doesn't show any background on the level that comes before *The code is pointing to live images on Image Shack so you can save and run that it will work normally on Firefox but you can see what happen on IE6/7. Also I can't give a specific class for the intens inside the containet "background" because it's a CMS that I'm trying to style! the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Problem With IE6 and 7</title> <style type="text/css"> * {padding:0px; margin:0px auto;} body {font-family:Verdana, Geneva, sans-serif; color:#666; font-size:14px; text-align:justify;} .background {width:300px;} .background div {background:url(http://img6.imageshack.us/img6/5763/76022084.png) repeat-y;} .background div div {background:url(http://img253.imageshack.us/img253/444/97936614.png) top left no-repeat;} .background div div div {background:url(http://img13.imageshack.us/img13/3667/45918712.png) bottom left no-repeat;} .background div div div div {padding:15px; background:none;} </style> </head> <body> <div class="background"> <div><div><div><div> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis ut sagittis nisl. Nullam facilisis volutpat metus eu semper. Sed eleifend, mi sed rhoncus interdum, neque quam pellentesque diam, in tincidunt metus nulla in ligula. Donec dui tellus, ultricies vel venenatis vitae, aliquam et purus. Cras eu nunc urna, in placerat quam. Pellentesque lobortis pellentesque orci, a tempus diam consequat nec. Aliquam erat volutpat. Aliquam laoreet blandit tellus in mollis. Duis tincidunt, justo sit amet lacinia ultrices, nibh justo venenatis erat, non commodo libero ligula quis ante. Cras eget nulla nec est accumsan porttitor at euismod nulla. Integer pharetra lacinia malesuada. Donec commodo vestibulum est, eget pellentesque velit volutpat nec. In id erat nec ipsum consequat convallis id non libero. Sed dui nisl, molestie vel dignissim sed, mattis in est. Vestibulum porttitor posuere ipsum, id facilisis libero dapibus et. Fusce consequat malesuada nulla, vitae faucibus neque consectetur eget. Curabitur porta dapibus justo dictum porttitor. Curabitur facilisis faucibus diam, vel dapibus ipsum ornare sed. Vestibulum turpis nulla, facilisis condimentum sodales sed, imperdiet placerat mi. Cras ac risus ipsum. </p> </div></div></div> </div><!-- class background end here --> </body> </html>

    Read the article

  • Android AppWidget TextView: How to set background color programmaticly

    - by Amit
    I am trying to create an AppWidget, in which the background color of a TextView changes at random at specified periodic interval. The TextView is defined in layout xml file as <?xml version="1.0" encoding="utf-8" ?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/widget" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/message" android:background="#ff99ff" android:text="Hello Widget" /> </LinearLayout> In update method, i have loaded the layout as RemoteViews remoteView=new RemoteViews(context.getPackageName(),R.layout.widget_message); To change the background of TextView i used the following statement remoteView.setInt(R.id.message, "setBackgroundResource", R.color.col_1); But i am getting a widget saying problem loading widget. If i remove the above line everything works fine. LogCat says: updateAppWidget couldn't find any view, using error view android.widget.RemoteViews$ActionException: view: android.widget.TextView can't use method with RemoteViews: setBackgroundResource(int)

    Read the article

  • Android AppWidget TextView: How to set background color at run time

    - by Amit
    I am trying to create an AppWidget, in which the background color of a TextView changes at random at specified periodic interval. The TextView is defined in layout xml file as <?xml version="1.0" encoding="utf-8" ?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/widget" android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical" > <TextView android:id="@+id/message" android:background="#ff99ff" android:text="Hello Widget" /> </LinearLayout> In update method, i have loaded the layout as RemoteViews remoteView=new RemoteViews(context.getPackageName(),R.layout.widget_message); To change the background of TextView i used the following statement remoteView.setInt(R.id.message, "setBackgroundResource", R.color.col_1); But i am getting a widget saying problem loading widget. If i remove the above line everything works fine. LogCat says: updateAppWidget couldn't find any view, using error view android.widget.RemoteViews$ActionException: view: android.widget.TextView can't use method with RemoteViews: setBackgroundResource(int)

    Read the article

  • Qt: Background color on QStandardItem using StyleSheet

    - by Johan
    Hi I have a class that inherits QStandardItem and I put the elements in a QTreeWidget. The class receive notifications from the outside and I want to change the background color of the item based on what happened. If I do not use stylesheets it works just fine, like this: void myClass::onExternalEvent() { setBackground(0, QColor(255,0,0))); } However as soon as I put a stylesheet on the QTreeWidget this has no effect, the stylesheet seems to override the setBackground call. So I tried : void myClass::onExternalEvent() { this-setStyleSheet("background-color: red"); } but this is probably all wrong, it changed the color of some other element on my screen, not sure why. So anyone have an idea on how I can alter the background color like with setBackgroundColor but still be able to use stylesheet on my QTreeWidget?

    Read the article

  • Help in using shape drawable as my background xml

    - by n179911
    I really appreciate if someone can help me with using how to use shape drawable as my background xml for my view. This is what I tried: But I never get the color. Android always gives me black text on white background, regardless what color attribute I put. <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <stroke android:width="1dip" android:color="#FBBB" /> <solid android:color="#6000"/> </shape> I tried , does not work <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:color="#6000> </shape> I tried , does not work <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" android:background="#6000> </shape> I google this is the limited result I found to try.

    Read the article

  • Add URL link in CSS Background Image?

    - by neversaint
    I have a CSS entry that looks like this: .header { background-image: url("./images/recountLogo.png"); background-repeat: no-repeat; height:160px; padding-left:280px; padding-top:50px; width:470px; color: #eaeaea; border-bottom:1px solid #eaeaea; } How can I add the link to the the background image in that CSS? The full CSS can be found here and the html that uses is there.

    Read the article

  • Using background-attachment:fixed in safari on the ipad

    - by chris_bcn
    I'm looking to recreate an effect similiar to the popular science app. Basically have one big background image and then have HTML/CSS layer on top of that. When the user scrolls the content, then background-position of the image should remain in place, and not scroll. Obviously in a 'regular' browser I would use background-attachment:fixed, but this doesn't seem to work on the ipad. I know position:fixed doesn't work as you might expect according to safari spec - but is there any way of achieving this?

    Read the article

  • background scroll-y with liquid layout

    - by TwinPeaksMall
    I have a liquid layout but I am unsure how to get the background to act in the same manner as the content. I have an image which is being created using the scroll-y css call. On full screen it looks great and creates a bordered white box where all the main content goes in and is directly in the middle of the page. However when I resize my window the background image stays in the same place where as all my content is moved to adjust for the window size. Is there anyway to get the background scroll-y image to move in the same liquid style as the rest of the contenyt?

    Read the article

  • Setting the background color of WPF TabControl inactive tabs

    - by David Veeneman
    Is there a simple way to set the background brush of all inactive tabs in a WPF TabControl? I want to emulate the look of VS 2010 on a TabControl--the background color of the control's inactive tabs should match the background color of the window in which the TabControl is sited, so that you see only the text of the tab, and not the tab itself. I know it will take a ControlTemplate to do it; I am trying to figure out what to put in the control template. Put another way, How do I specify that a particular brush should be applied to all inactive tabs? Thanks for your help.

    Read the article

  • Use jQuery to find div by background color

    - by maxsilver
    I'm trying to use jQuery to find the number of divs that are both visible, and have a background color of Green. (Normally I'd just add a class to the div, style it green, and check for that class in jQuery but in this instance, I can't actually change the markup of the page itself in any way) I currently have the visible div part working as : if( // if there are more than one visible div $('div.progressContainer:visible').length > 0 ){ I'd like to throw some kind of "and background color is green" selector in there. // not legit javascript if( // if there are more than one visible div, and its color is green $('div.progressContainer:visible[background-color:green]').length > 0 ){ Is it possible to do this?

    Read the article

  • [WPF] selected item in listbox unreadable because of the color !

    - by Anna
    I dynamically create a collection of stackpanels in my listbox. In this stackpanel are contained labels and checkbox horizontally aligned. The problem is when I click on a stackpanel, the selection is unreadable because the line become dark-blue whereas the letters stay black so black on blue, you see nothing... how can I dynamically change the forecolor of the selected elements in the stackpanel ? I say dynamically and not in the xml file, because all those elements are dynamically created, base on a database... thanksssss!!

    Read the article

  • Background settings for a JDesktopPane

    - by EricR
    I'm using a self-made DesktopPaneUI for a JDesktopPane, I've written the proper methods for the class, and I'm running into trouble. When I resize the JDesktopPane, the background image doesn't resize with the frame. The image appears to be clipped at the size it was when the window initially opened. I'm giving it an image larger than the window, and I'm still having this problem. Here's my method call inside the constructor of my desktopUI class. super(); this.background = javax.imageio.ImageIO.read(new File(fileName)); Is there a way I can change my main class where I set the UI, or the myDesktopPaneUI class such that the background still fills the window when the JDesktopPane changes size? setUI(new myDesktopPaneUI("media/bg.jpg"));

    Read the article

  • label backgrond flicking on a WinForms user control has background image enabled

    - by slowlycooked
    I am working on a windows form project and having some problem with UserControl Double Buffering. I created a usercontrol and has a background image, then on top of it I have few radio buttons and labels. Radio buttons and labels are all having transparent background as color. However, when I show and hide the User control, I can see the flickering on those labels and radio buttons that has transparent background. And I tried Me.SetStyle(ControlStyles.DoubleBuffer _ Or ControlStyles.AllPaintingInWmPaint _ Or ControlStyles.UserPaint _ Or ControlStyles.SupportsTransparentBackColor, _ True) After initializeComponent() to enable double buffer on this user control, but it doesn’t seem to work.

    Read the article

  • how to set the background image property of a div to a dynamically generated image

    - by tixrus
    I have some divs and each one has its own background image. The base images as stored is just a black silhouette. What I would like to do is use the PHP GD package to modify the color of those images somewhat randomly and have the modified randomly coloured images be the background images of the divs. One way to do it is just create GD images structures from the original files, modify them, save the results as a temp file, pass this filename into the client, and then use jquery to modify the css background image properties of the divs to be the new file. But this is going to leave a lot of files laying around to garbage collect. Is there some way to do it without creating a bunch of files?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >