Search Results

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

Page 46/446 | < Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >

  • JPanel background image

    - by Zloy Smiertniy
    This is my code, it indeed finds the image so that is not my concern, my concern is how to make that image be the background of the panel. I'm trying to work with Graphics but i doesnt work, any ideas?? please?? try { java.net.URL imgURL = MAINWINDOW.class.getResource(imagen); Image imgFondo = javax.imageio.ImageIO.read(imgURL); if (imgFondo != null) { Graphics grafica=null; grafica.drawImage(imgFondo, 0, 0, this); panel.paintComponents(grafica); } else { System.err.println("Couldn't find file: " + imagen); } } catch...

    Read the article

  • Change text fields background colour if negative number using Jquery/CSS

    - by Dan C
    Hi, I have the following text input on a budget calculator form which displays the final balance... <tr><td align="right"><b>Balance: &pound;</b></td><td align="left"><input type="text" class="res" name="res" id="res" size="10" readonly="readonly"></td></tr> How do I go about setting the background of the input to red using css and jquery if the value is a negative number? I am sure this is very simple but I have scanned the net looking for a solution for ages. Please can someone help?, my head hurts!

    Read the article

  • CSS Change background parent of element

    - by bratna
    I have some problem that i want to change it with css <div class="a"> <div class="b"> <span></span> </div> <div class="c"> <span></span> </div> <div class="d"> <span class="e"></span> </div> </div> I want to change background of div.b and div.c by using span.e Please help me. Thanks

    Read the article

  • Flex: Why is line obscured by canvas' background

    - by mauvo
    I want MyCanvas to draw lines on itself, but they seem to be drawn behind the background. What's going on and how should I do this? Main.mxml <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:my="*"> <my:MyCanvas width="300" height="300" id="myCanvas"></my:MyCanvas> <mx:Button label="Draw" click="myCanvas.Draw();"></mx:Button> </mx:Application> MyCanvas.as package { import mx.containers.Canvas; public class MyCanvas extends Canvas { public function MyCanvas() { this.setStyle("backgroundColor", "white"); } public function Draw():void { graphics.lineStyle(1); graphics.moveTo( -10, -10); graphics.lineTo(width + 10, height + 10); } } } Thanks.

    Read the article

  • background colour in opengl

    - by lego69
    I want to change background color of the window after pressing the button, but my program doesn't work, can somebody tell me why, thanks in advance int main(int argc, char* argv[]) { glutInit(&argc, argv); glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB); glutInitWindowSize(800, 600); glutInitWindowPosition(300,50); glutCreateWindow("GLRect"); glClearColor(1.0f, 0.0f, 0.0f, 1.0f); <--- glutDisplayFunc(RenderScene); glutReshapeFunc(ChangeSize); glutMainLoop(); system("pause"); glClearColor(0.0f, 1.0f, 0.0f, 1.0f); <--- return 0; }

    Read the article

  • Draw window with just borders

    - by Tonatiuh
    How can I create a application window that is showing just the borders of the window, but i don't want to show the contents of the window itself. I mean i want to see the rest of the desktop or the others windows through the entire region of my window. No using transparences. Just draw the borders. I suppose it's like detecting the messages WM_ERASEBKGND and WM_PAINT and doing nothing in these cases to force not painting in the contens, but I have tried and window is still drawing a white background. How can i get it?

    Read the article

  • Can't set background colour for UIView from ViewController

    - by Curyous
    I have the following code in the view controller: - (void)viewDidLoad { [super viewDidLoad]; ThemeManager *themer = [ThemeManager sharedInstance]; UIView *theView = self.view; UIColor *forBackground = [themer backgroundColour]; [theView setBackgroundColor:forBackground]; } but when execution gets to the setBackgroundColor line, I get the following error: *** -[NSCFNumber CGColor]: unrecognized selector sent to instance 0x1237c40 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSCFNumber CGColor]: unrecognized selector sent to instance 0x1237c40' There's got to be something simple that I'm doing wrong, how do I set the background colour? Do I have to subclass the view and do it in there? I'd prefer not to have the extra class, even though that is better separation of the whole model/view/controller thing. Update: value returned by [themer backgroundColour] is constructed using colorWithPatternImage:, could this make a difference?

    Read the article

  • How to always run a service in the background

    - by Thomas H
    Hi I am in the process of creating an app that is similar to the build-in SMS app. What I need: - a service that is always running in the background - every 5 min. the service checks the current location of the device and calls a web service - if certain criteria are meet, the service should generate a notification (just like the SMS app) - when the notification is clicked, the user is taken to the app (just like the SMS app) - when the app is installed the service should be started - when the device is rebooted, the service should be started What I have tried: - running a regular service which worked just fine until android kills the service - using the AlarmManager the make the 5 min. interval call to a service. But I was not able to make this work. Any help would be greatly appreciated... -Thomas

    Read the article

  • Check if key is pressed using python (a daemon in the background)

    - by Nazarius Kappertaal
    I've created a python script in which an event needs to be executed each time I press the Super (or WinKey) on my keyboard. How can one achieve this without the python process being "focused" - as it is running in the background waiting for the key to be pressed to execute the event? I've seen a lot of posts around the web showing me how to read input - but they have all required one to have the process "focused" and none have showed me how to capture the Super (or WinKey) using a python script. I'm running Ubuntu 9.10.

    Read the article

  • jquery background image rotating script doesn't work

    - by Catfish
    I'm writing this script to rotate a background Image every 3 seconds but it doesn't work at all and i'm stumped as to why not. $(document).ready(function() { var inc = 0; var bgImages = new Array(); bgImages.push("../Images/backgroundDog-small.jpg"); bgImages.push("../Images/backgroundDog1-small.jpg"); bgImages.push("../Images/backgroundDog2-small.jpg"); bgImages.push("../Images/backgroundDog3-small.jpg"); setInterval(change, 3000); function change() { //if we're not at the end of the array if (inc < (bgImages.length)) { var image = bgImages[inc]; $('body').css('backgroundImage', image); console.log(image); inc++; //reset the counter inc and go through the array again } else { inc = 0; } } });

    Read the article

  • iPad/iPhone uiSearchbar transparent background

    - by Tom
    I know this questions was asked(and solved) before, but this wont work for me. as a matter of fact, I had it already solved, but this issue came back out of nowhere and struck me on the head. I am not able to set the background of my UISearchBar transparent. I was always using: searchBar.backgroundColor = [UIColor clearColor]; [[searchBar.subviews objectAtIndex:0] removeFromSuperview]; and it worked nicely... but suddenly it stopped. could be since I upgraded my xcode-version but I am not sure. I spent a couple of hours already investigating this.. Is somebody out there to do this? please point me in the right direction. thanks heaps!!! best regards T

    Read the article

  • Weird background offset of UIToolbar when in formSheet.

    - by Mike A
    As you can see in the pic, the buttons from the toolbar on the right align perfectly with the segmented control on the left. They are displayed on the navigation bar. For some reason though, the background of the toolbar seems to be offset 1px to the bottom. What is especially weird, is this exact same view controller, in fullScreen or even pageSheet, displays everything properly. Segmented control is being allocated: UISegmentedControl* segmentControl = [[UISegmentedControl alloc] initWithFrame:CGRectMake(0,0,300,30)]; Toolbar is being allocated: UIToolbar* toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 100,44)]; I've spent hours trying to fix this, it's driving me crazy.

    Read the article

  • Starting a cocos2d game with initial gameplay as background

    - by boz
    Hi All, Id like to start my game, with the initial game play layout as the background, with a buttons layer over the top with maybe 'Tap to start' and a high score etc. and similarly, when the game finishes, id like to just 'pause' the final game play layout and overlay a game over menu of sorts. I tried calling [[CCDirector sharedDirector] pause] as the last line of the appDidFinishLaunching which didnt seem to have any effect. Is there a better way trying to do this? I dont really like my initial approach.

    Read the article

  • UISearchDisplayController's full-screen background intercepts touch events in iOS 7

    - by tba
    I have a UITableview that doesn't take up the whole screen (screenshot). Everything worked fine in iOS 6. But in iOS 7, when the user searches, the search result table takes up the whole view (screenshot). To fix this, I tried setting the frame manually as described in this answer. The appearance is now correct (screenshot), but now the "<" button in the top left doesn't receive tap events when the search results table is displayed. It seems the searchResultsTableView is adding a full-screen background view that is intercepting touch events. To prove this, I added this code to didShowSearchResultsTableView: controller.searchResultsTableView.superview.backgroundColor = [UIColor blueColor];` This screenshot confirms my hypothesis. How can I fix this to allow the "<" button to receive tap events? I want to avoid modifying controller.searchResultsTableView.superview so that my change doesn't break in future versions of iOS. And what change in iOS 7 caused this behavior to start happening?

    Read the article

  • Iphone UITableViewCell selection background

    - by user360297
    Hi, I'm developing custom tableViewCell for iphone, I used interface builder to design it and loaded in from code. It use custom background to show Cell Selection. It work ok expect form one small issue, there is a small rectangular area in left side dosen't show the custom image, but show default selection ( bule color ) in that area. Please take look at the image @ this link http://warunadesilva.com/fih/Untitled.png I selection image's with is 320px. Could anyone suggest possible solution for this problem, Thank you in advance. Waruna

    Read the article

  • OpenGL textures trigger error 1281 and strange background behavior

    - by user3714670
    I am using SOIL to apply textures to VBOs, without textures i could change the background and display black (default color) vbos easily, but now with textures, openGL is giving an error 1281, the background is black and some textures are not applied. There must be something i didn't understand about applying/loading the textures. BUt the texture IS applied (nothing else is working though), the error is applied when i try to use the shader program however i checked the compilation of these and no problems were written. Here is the code i use to load textures, once loaded it is kept in memory, it mostly comes from the example of SOIL : texture = SOIL_load_OGL_single_cubemap( filename, SOIL_DDS_CUBEMAP_FACE_ORDER, SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_POWER_OF_TWO | SOIL_FLAG_MIPMAPS | SOIL_FLAG_DDS_LOAD_DIRECT ); if( texture > 0 ) { glEnable( GL_TEXTURE_CUBE_MAP ); glEnable( GL_TEXTURE_GEN_S ); glEnable( GL_TEXTURE_GEN_T ); glEnable( GL_TEXTURE_GEN_R ); glTexGeni( GL_S, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP ); glTexGeni( GL_T, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP ); glTexGeni( GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP ); glBindTexture( GL_TEXTURE_CUBE_MAP, texture ); std::cout << "the loaded single cube map ID was " << texture << std::endl; } else { std::cout << "Attempting to load as a HDR texture" << std::endl; texture = SOIL_load_OGL_HDR_texture( filename, SOIL_HDR_RGBdivA2, 0, SOIL_CREATE_NEW_ID, SOIL_FLAG_POWER_OF_TWO | SOIL_FLAG_MIPMAPS ); if( texture < 1 ) { std::cout << "Attempting to load as a simple 2D texture" << std::endl; texture = SOIL_load_OGL_texture( filename, SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_POWER_OF_TWO | SOIL_FLAG_MIPMAPS | SOIL_FLAG_DDS_LOAD_DIRECT ); } if( texture > 0 ) { // enable texturing glEnable( GL_TEXTURE_2D ); // bind an OpenGL texture ID glBindTexture( GL_TEXTURE_2D, texture ); std::cout << "the loaded texture ID was " << texture << std::endl; } else { glDisable( GL_TEXTURE_2D ); std::cout << "Texture loading failed: '" << SOIL_last_result() << "'" << std::endl; } } and how i apply it when drawing : GLuint TextureID = glGetUniformLocation(shaderProgram, "myTextureSampler"); if(!TextureID) cout << "TextureID not found ..." << endl; // glEnableVertexAttribArray(TextureID); glActiveTexture(GL_TEXTURE0); if(SFML) sf::Texture::bind(sfml_texture); else { glBindTexture (GL_TEXTURE_2D, texture); // glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 1024, 768, 0, GL_RGB, GL_UNSIGNED_BYTE, &texture); } glUniform1i(TextureID, 0); I am not sure that SOIL is adapted to my program as i want something as simple as possible (i used sfml's texture object which was the best but i can't anymore), but if i can get it to work it would be great. EDIT : After narrowing the code implied by the error, here is the code that provokes it, it is called between texture loading and bos drawing : glEnableClientState(GL_VERTEX_ARRAY); //this gives the error : glUseProgram(this->shaderProgram); if (!shaderLoaded) { std::cout << "Loading default shaders" << std::endl; if(textured) loadShaderProgramm(texture_vertexSource, texture_fragmentSource); else loadShaderProgramm(default_vertexSource,default_fragmentSource); } glm::mat4 Projection = camera->getPerspective(); glm::mat4 View = camera->getView(); glm::mat4 Model = glm::mat4(1.0f); Model[0][0] *= scale_x; Model[1][1] *= scale_y; Model[2][2] *= scale_z; glm::vec3 translate_vec(this->x,this->y,this->z); glm::mat4 object_transform = glm::translate(glm::mat4(1.0f),translate_vec); glm::quat rotation = QAccumulative.getQuat(); glm::mat4 matrix_rotation = glm::mat4_cast(rotation); object_transform *= matrix_rotation; Model *= object_transform; glm::mat4 MVP = Projection * View * Model; GLuint ModelID = glGetUniformLocation(this->shaderProgram, "M"); if(ModelID ==-1) cout << "ModelID not found ..." << endl; GLuint MatrixID = glGetUniformLocation(this->shaderProgram, "MVP"); if(MatrixID ==-1) cout << "MatrixID not found ..." << endl; GLuint ViewID = glGetUniformLocation(this->shaderProgram, "V"); if(ViewID ==-1) cout << "ViewID not found ..." << endl; glUniformMatrix4fv(MatrixID, 1, GL_FALSE, &MVP[0][0]); glUniformMatrix4fv(ModelID, 1, GL_FALSE, &Model[0][0]); glUniformMatrix4fv(ViewID, 1, GL_FALSE, &View[0][0]); drawObject();

    Read the article

  • MPMoviePlayerController not setting the bounds for background image

    - by VXtreme
    I am using MPMoviePlayerController for playing the media . I want to set the image at the background of the player.The image is set accordingly but when i set the bounds for the image then the image is not set according to bounds . I have tried following code: UIImageView *imageView=[[UIImageView alloc]initWithImage:[operationControl getCoverImage:stringId]]; imageView.bounds=CGRectMake(0, 100, 200, 200); [moviePlayer.backgroundView addSubview:imageView]; [moviePlayer.backgroundView setBackgroundColor:[UIColor purpleColor]]; moviePlayer.controlStyle = MPMovieControlStyleDefault; moviePlayer.shouldAutoplay = YES; [moviePlayer setScalingMode:MPMovieScalingModeAspectFit]; [self.view addSubview:moviePlayer.view]; [moviePlayer setFullscreen:YES animated:YES];

    Read the article

  • iPhone: Add background button to view when UITableView has no cells

    - by Nic Hubbard
    I have a UITableViewController, when there is no data to populate the UITableView, I want to add a button, which uses an image. So, rather than the user seeing a tableview with no records, they will see an image that says, "No records have been added, Tap to add one", then they click and we create a new one. I assumed I would just hide the UITableView, then create the button, but I never see the button. Here I am using: if ([[fetchedResultsController sections] count] == 0) { self.tableView.hidden = YES; // Create button w/ image UIButton * btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(0, 0, 100, 50); [btn setImage:[UIImage imageNamed:@"no-rides.png"] forState:UIControlStateNormal]; [self.view addSubview:btn]; } Ideas on why I would never see the button? When I show this view, it seems to have a transparent background for a second, then changes white...

    Read the article

  • WPF update binding in a background thread

    - by Mark
    I have a control that has its data bound to a standard ObservableCollection, and I have a background task that calls a service to get more data. I want to, then, update my backing data behind my control, while displaying a "please wait" dialog, but when I add the new items to the collection, the UI thread locks up while it re-binds and updates my controls. Can I get around this so that my animations and stuff keep running on my "please wait" dialog? Or at least give the "appearance" to the user that its not locked up?

    Read the article

  • Background image not getting vertically stretched in Chrome.

    - by KPL
    Hi all, The CSS - #header { overflow: hidden; background: url(images/header-bg.png) top repeat-x #FFFFFF; position: relative; border: none; display: block; height: 125px; width:100%; } The HTML - <div id="header"> <a href="http://localhost/" title="Dev" id="logo"><img src="images/logo.png" alt="" /></a> </div> This works good in Firefox - But not in Chrome :( - The image isn't being stretched vertically in Chrome. Help! Just a note, I'm on Linux.

    Read the article

  • Xcode: How-to bind a key that triggers application to appear (background daemon)

    - by Shyam
    Hi, I am struggling to create a certain kind of application my Mac, using Xcode and Interface Builder (RubyCocoa). As I am a nuby (but understand some Ruby), I would like to know how I could let my interface appear only if a key is pushed (a toggle), while the program is running in the background. Similar behavior like when I'd press the F4-key to show Dashboard. Really neat would be if the program wouldn't be showing as running in the Dock, but as a funky icon in the top bar, like well "Growl". Thank you so much for your help, comments and feedback!

    Read the article

  • View plain text files with different background colors in Mac OSX, for different programming languag

    - by Werner
    Hi, I work with Mac OS X Leopard. I usually have 5 or 10 text files opened at the same time with different programming languages; one for a bash script, another for a python one, etc. When I use exposé all of them look the same, so it is difficult to select them. I wonder how could I work with just plain text files in OSX, so when they are opened in an editor the background color changes or some other thign, so when using exposé it is clear to me which window belongs to what language. I thought about inserting some kind of info to the last line of each document, and then creat some applescript that converts it to RTF or someother text document which includes color in bacjground, so then it is opened with textmate or someother app. Do you know a better approach for this? Thanks

    Read the article

  • Activity should be transparent, but has black background

    - by Uwe Krass
    I followed the instructions of writing a transparent layout. My res/values/style.xml looks like this: <resources> <style name="Theme" parent="android:Theme" /> <style name="Theme.Transparent"> <item name="android:windowBackground">@drawable/transparent_background</item> </style> <drawable name="transparent_background">#00000000</drawable> </resources> The activity snippet looks like this: <activity android:name=".Controlls" android:label="Controlls" android:theme="@style/Theme.Transparent"> When I start this activity from my root activity, the layout gets drawn correctly, but the background stays black.

    Read the article

  • Using Cases to change background colour | Visual Studio 2008

    - by Simon
    I really need help working with cases, I'm only learning it so far, but just can't get a drop down menu to work that would change the background of a Textbox. Private Sub cbColours_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbColours.SelectedIndexChanged Select Case colours Case Is = "Red" txtSpace.BackColor = Color.Red Case Is = "Blue" txtSpace.BackColor = Color.Blue Case Is = "Green" txtSpace.BackColor = Color.Green End Select End Sub It isn't doing anything at all... In the dropdown menu, it has Red, Blue and Green one per line When the value (e.g. Green) is clicked, it will then change the Textbox to the colour selected. Many help appreciated :)

    Read the article

  • Background image for navigation view (iPhone)

    - by Mladen
    Hi Guys, I am having problems with properly displaying background image of navigation view. Here is the pic: Here is the code: (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:style]) { UIImage *image = [UIImage imageNamed: @"bg_table_active.png"]; UIImageView *imageview = [[UIImageView alloc] initWithImage: image]; UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Settings", @"") style:UIBarButtonItemStyleDone target:self action:@selector(GoToSettings)]; self.navigationItem.titleView = imageview; self.navigationItem.rightBarButtonItem = addButton; self.navigationItem.hidesBackButton = TRUE; } return self; } How to make the picture stretch to whole navigation view?

    Read the article

< Previous Page | 42 43 44 45 46 47 48 49 50 51 52 53  | Next Page >