w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
change background color of window from data inputed from text field
I'm not familiar with titanium, but here's a couple of suggestions: function bgColour(colourData) { // do some transformations on the color data perhaps? // 1. We need to actually return the data: return colourData; } saveButton.addEventListener('click', function (e) { // 2. We need to get the value of the text field AFTER the saveButton // has been clicked, so this part of code is inside the event listener: var colourData = colourTextField.value; // 3. Mind the "style" and capital "C" in backgroundColor savedLocationsWindow.style.backgroundColor = bgColour(colourData); carLoggerTabGroup.setActiveTab(savedLocationsTab); });

Categories : Javascript

How to get background color of a dialog/window?
http://qt-project.org/doc/qt-4.8/qwidget.html#palette-prop http://qt-project.org/doc/qt-4.8/qpalette.html http://qt-project.org/doc/qt-4.8/qpalette.html#ColorRole-enum QPalette::Window - 10 - A general background color. QPixmap::grabWindow(); can get you any part of the desktop. Hope that helps.

Categories : Qt

Emacs: Set background color for specific window
Doing it for one specific window is not a feature Emacs supports right now. OTOH you can do it for a specific frame, so if your window is inside a frame with a single window (as is often the case for dedicated windows), you can definitely set the background-color frame-paramter (and should be able to set it directly from display-buffer-alist or special-display-regexps.

Categories : Emacs

CSS background color width reduces when browser window is resized
I think the best way to solve this is to add a minimum width to your body. This way when the viewport is too narrow to show all your content, a horizontal scrollbar will allow the user to access the entire page. By the looks of your content, min-width: 1100px; would be just about right.

Categories : HTML

Load another window in background; when rendered, close the parent window
Changed code to: InitWindow I = null; Thread C = null; public InitWindow() { InitializeComponent(); I = this; C = Thread.CurrentThread; Thread T = new Thread(() => { MainWindow M = new MainWindow(); M.Show(); M.ContentRendered += M_ContentRendered; System.Windows.Threading.Dispatcher.Run(); M.Closed += (s, e) => M.Dispatcher.InvokeShutdown(); }) { IsBackground = true, Priority = ThreadPriority.Lowest }; T.SetApartmentState(ApartmentState.STA); T.Start(); } void M_ContentRendered(object sender, EventArgs e) { // Making the parent thread background C.IsBackground = true; // foreground the current thre

Categories : C#

How to change "activity in window" color in byobu
Sure! You can set it like this, in your ~/.byobu/.tmux.conf: set -g window-status-activity-bg red For a complete list of color options, refer to tmux.1 and specifically its OPTIONS section Full disclosure: I am the author and maintainer of Byobu.

Categories : Misc

Strange window background for textured window in Mac OS X 10.8
This is an issue with the setting for the window's Content Border. Set the content border to "none" or another value appropriate for your app. In Xcode's interface builder, select the window. Choose the Size Inspector, then adjust the "Content Border".

Categories : Osx

How to change Windows 7 Aero / Window border color programatically?
Maybe you could contact the developer of this small application. Ask how he did it.. i'm not sure he used C# to accomplish this. But it's worth a shot. This is my final search, I couldn't find anything else usefull so...

Categories : C#

How to change position of window controls relative to the window size
Not necessarily the best way, but what I'd probably do is handle WM_SIZE and/or WM_SIZING and then in there use : m_Button.SetWindowPos(x, y, 0, 0, SWP_NOSIZE | SWP_NOZORDER); where x and y are the new co-ordinates of the top-left of where you want your button.

Categories : Visual Studio 2010

Bootstrap: How to change menu item color due modal window closing
If I understand correctly you want to remove the class to your link when the modal is closed, for that you can bind to the model 'hide' event, try adding this JavaScript code: $('#myModal').on('hide',function(){ $('.nav > li > a.modal-open-li').removeClass('modal-open-li'); }); And about adding multiple data-toggles for an element, I don't know if it's possible but I would advise against it because do you really need to toggle a dropdown and open a modal at the same time? I think there would be a better way to improve UX

Categories : Javascript

pyQt window is doesn't update until I change window
I solved this by linking the ComboBoxes to a function that call the update function: Linking, self.nameCombo.currentIndexChanged.connect(self.comboChanged) the function, self.comboChanged(self): self.updateComboData() self.update() Note that when loading the gui for the first time, the currentIndexChanged signal is sent.

Categories : Python

My inputcommand keybinding to main window does not work when child window is focussed(same wpf window)?
The key bindings will only work if the Form is focused. You could redirect every Command in your new Window to the Main Window Change your Constructor to of the new Window to accept a Main Window and save this window: MainWindow mainWindow; public Window(MainWindow w) { mainWindow = w; } Whenever a Keybinding executes just do something like this: mainWindow.TabPress(); And show the Window with Window childwindow = new Window(this) { Title = "ChildWindow", Width = 200, Height = 300 }; childwindow.Show();

Categories : C#

javascript/jquery : Window.open opens child window but after few seconds child window get automatically closed for some urls(for IE and chrome)
It's because this code is executed on init on https://wpc.gcsip.com/wpc/wpc page // check that this page is not in a subwindow (e.g. after a session time out) if ( window.opener ) { window.opener.location = "wpc"; window.opener.focus(); window.close(); }

Categories : Javascript

selenium - how to change current window location without closing the selenium window?
It can be done, but some magic is required. Use this.browserbot.openLocation in the target. e.g. this.browserbot.openLocation('http://blog.reallysimplethoughts.com/'); Command storeEval Target this.browserbot.openLocation('http://blog.reallysimplethoughts.com/'); Value ignore_me You might want to check out Sel Blocks v1.3.1 and use the if/else around a normal open command.

Categories : Javascript

Change text color and background color of textview using color picker in android
As is replied in this question: Android Color Picker there is an example of color picker. Using it you could change the color with: Color colorPicket = Color.parse("color returned of color picket"); TextView textView = (TextView) v; textView.setBackgroundColor(colorPicked); //if it returns in hex you can parse with COlor.par textView.setTextColor(colorPicked); Take a look: Color.parseColor

Categories : Android

open the link from the popup window in an external window and then close the original popup window
Try <input name="Apply Online" type="button" id="Apply Online" value="Apply Online" ONCLICK="window.location.href='some_url';$.colorbox.close();"> or <input name="Apply Online" type="button" id="Apply Online" value="Apply Online" ONCLICK="window.location.href='some_url';parent.$.colorbox.close();">

Categories : Javascript

window.close closes the postbacked child window and a copy of child window still appears
The showModalDialog method will freeze JavaScript execution on the parent window until the dialog that it opens has closed, so we can rule out that as the reason why your second window opens. When FileUpload.aspx posts back from the server, it should work the same way as modeless aspx postbacks. I think you should be able to get rid of the window.open() method and you should be fine. Parent window: window.showModalDialog("FileUpload.aspx", "FileUpload", "center:yes;resizeable=yes;dialogHeight:300px;dialogWidth:600px;"); The Child window will call this when it's done. window.close();

Categories : Javascript

Change listview row item background color and text color in android
Concerning the background, you should create a StateList Drawable and set it as the background of your rows. Ex of a such drawable (could be named background_selector.xml) : <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_pressed="true" android:drawable="@color/color1" /> <!-- pressed --> <item android:drawable="@color/color2" /> <!-- default --> </selector> And in the layout declaration of your row : ... android:background="@drawable/background_selector" ... Use the same way for your text with the Color State List

Categories : Android

Change font color based on the background image dominating color(in the text area)
may be create a table on top of your image. This way you can control the area of your text with a contrasting color and you can change you font to whatever you like. The image in the background can stay to whatever you like and I am assuming the image is in the body of your page. Anyways,this is I could think of for you and I hope it helps. I know colors and images are always hard and time consuming to get them set up. <table border="0" bgcolor="#00FF00"> <tr> <th>day</th> <th>Saving</th> </tr> <tr> <td>January</td> <td>something</td> </tr> </table>

Categories : PHP

Change foreground color dynamically based on background color
I found the solution to my problem. TextBlock does not derive from Control. Any text shown on UI by any control internally uses TextBlock to represent the textual content. If TextBlock style is set using the following in ResourceDictionary: <Style TargetType="TextBlock"> <Setter Property="FontFamily" Value="Arial" /> <Setter Property="FontSize" Value="12" /> <Setter Property="FontStyle" Value="Normal" /> </Style> Any control that represents text will have this style (since no key is assigned to this style which implies that all TextBlock will get it by default) unless the control's template override the TextBlock's default style which can be done as follows: <Button Grid.Column="1" Style="{StaticResource NoChromeButton}"> <TextBloc

Categories : Wpf

Change background color of a div temporarily on click and then set to a different color
If can use jquery to do that you will have something like that function playAudio(src) { // Change bg color for the div to yellow here $("formal").css('background-color','yellow'); if (my_media == null) { // Create Media object from src my_media = new Media(src, onSuccess, onError); } // else play current audio // Play audio my_media.play(); // change background color to light yellow here $("formal").css('background-color','blue'); } you can put a hex color to get the color that you want

Categories : Javascript

Change TextBlock foreground color using background color
I tested my code by setting Background on only TextBlock control and I could see the following style triggers working as expected when declared as global style sheet: <Style TargetType="TextBlock"> <Setter Property="FontSize" Value="12"/> <Setter Property="FontStyle" Value="Italic"/> <Style.Triggers> <Trigger Property="Background" Value="White"> <Setter Property="Foreground" Value="Aqua"/> </Trigger> <Trigger Property="Background.Color" Value="Transparent"> <Setter Property="Foreground" Value="BlueViolet"/> </Trigger> <DataTrigger Binding="{Binding RelativeSource={RelativeSource Self},Path=Background}" Value="Whi

Categories : Wpf

Closing a process child window (e.g. a Word window) accessing a specific file
I found this very detail post about the subject, maybe it can help you http://forum.sysinternals.com/howto-enumerate-handles_topic18892.html That post hase some disucussions and related questions here http://forum.sysinternals.com/topic19403.html

Categories : C#

pyGTK how to redisplay a top level window (with child widgets) after window destroy signal is sent
Have you tried making another copy of the window class and showing that one instead? Note: This will reset anything that was set in the window. i.e. if a person did something to make label1 say 'Hi!' instead of 'Hello!', it is going to be reset again to 'Hello!', since you are recreating the window.

Categories : Misc

Locking the size of a resizable window to the original aspect ratio of the window in Pyglet
Although this looks a little hackish for me, but at the moment I don't think of any other possibilities to solve you problem. Anyway, this is working: import pyglet window = pyglet.window.Window( resizable=True ) @window.event def on_resize( width, height ): ratio = 9/16 window.set_size( width, width*ratio ) @window.event def on_draw(): window.clear() pyglet.app.run()

Categories : Python

Why does Internet Explorer fire the window "storage" event on the window that stored the data?
Microsoft seems to be aware of the issue, but it doesn't look like they're going to fix it any time soon: https://connect.microsoft.com/IE/feedback/details/774798/localstorage-event-fired-in-source-window One option is that you can design your listeners and setters so that they don't react or store when they get information from a storage event that's already consistent with their state. However, this design pattern can be more difficult than relying on the storage event only firing on other windows. Another option is to make local storage work the same way in IE that it works in other browsers. I came up with an admittedly hacky but functional solution that I tested in IE10 and expect to work in IE8 and IE9. My javascript components don't listen to the window "storage" event directly bu

Categories : Javascript

window.URL || window.webkitURL not working with Safari browser version prior 5
The window.URL APIs are not supported on Safari 5. Take a look at the table here: http://caniuse.com/#search=createObjectURL Only the most recent versions of current browsers support the API.

Categories : Javascript

Javascript Window.Open how to obtain the opened child window from a different page
First its seen little bit tricky.. you declare some ajax function to send information to server whether child window opened or not.. if child window opened then refresh page. for E.g . -> assume that user opened 2 same page In different tabs1 and tab2. -> user opened opened popup window on tab2 and add/change some information.. -> tab2 content refresh as per ur event. you should also send a one flag to server with session id and tab1 continuous check is that any changes happed to server it will be refresh..

Categories : Javascript

How can I show alert in parent window from child popup window in javascript?
try this code <!DOCTYPE html> <html> <head> <script> function openWin() { myWindow=window.open('','','width=200,height=100'); myWindow.document.write("<p>This is 'myWindow'</p>"); refreshParent(); } function refreshParent() { window.parent.focus(); window.parent.alert("message"); window.parent.location.reload(); } </script> </head> <body> <input type="button" value="Open 'myWindow'" onclick="openWin()" /> </body> </html>

Categories : Javascript

How to call enlarge-window function depends on current window in Emacs
Taking advantage of windmove being part of emacs, this is what you can do: (require 'windmove) (defun move-separator-up (arg) (interactive "p") (if (< (cdr (windmove-other-window-loc 'up)) 0) (shrink-window arg) (enlarge-window arg))) (defun move-separator-down (arg) (interactive "p") (if (< (cdr (windmove-other-window-loc 'up)) 0) (enlarge-window arg) (shrink-window arg))) When you have 3 windows, enlarge-window and shrink-window rules might not do always what you want, so some further customization might be needed.

Categories : Emacs

How I can see the width & height of my window on the "body" when I am modifying the size of the window with jquery?
Like that? DEMO http://jsfiddle.net/yeyene/5ANZz/1/ $('#width').val($(window).width()); $('#height').val($(window).height()); $(window).resize(function(){ $('#width').val($(window).width()); $('#height').val($(window).height()); });

Categories : Jquery

Jquery .scroll() not working in IE with both $(window) and $(document). (issue with window.pageYOffset?)
From the MDN docs: For cross-browser compatibility, use window.pageYOffset instead of window.scrollY. Additionally, older versions of Internet Explorer (< 9) do not support either property and must be worked around by checking other non-standard properties. You could always use jQuery's implementation of scrollTop(), it should work for all browsers: $(window).scroll(function() { var y_scroll_pos = $(this).scrollTop(); var scroll_pos_test = 200; if(y_scroll_pos > scroll_pos_test) { $('.extratext').slideDown('slow'); } });

Categories : Javascript

how we can restrict user to click or go on the browser window until they close the opened pop up window?
You basically need a modal pop-up. This link should help you: http://www.codeproject.com/Tips/589445/JavaScript-Modal-Popup-Window

Categories : Javascript

For Chat window.whether i go for dynamic user control or client side div tag pop up window?
I helped write and maintain a simple chat window in ASP.Net WebForms a while back, the way we did it was to use some simple JavaScript making some HTTP requests to a page which had WebMethods on it. The C# page contained a WebMethod for getting new messages from the server which was called from JavaScript running on a setTimeout loop. It also contained a WebMethod for adding new messages to the session. If I recall correctly, some kind of queue was used per user involved in the chat session and all the method for getting new messages did was to map the user to the correct queue and take all the messages that were present at the time. Hopefully this helps.

Categories : Asp Net

How do I detect if a new window has been opened? The window opens via a submit with target="_blank"
My recommendation would be to check beforehand if the user is using the app and then modify the behavior based on that, rather than checking if a new window opened. I have in the past accomplished this by checking the screen.width property (can be similarly accomplished in CSS), but you can do it more cleanly (courtesy of this post's answer): if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) { // some code.. } This is cleaner, as you can determine at load time whether you'll need to open in the current window or a new window, rather than reacting later to something that happens for the user.

Categories : Javascript

Can I interact with the current debugging session variables using C# Interactive window or Immediate window?
You could use linq to do anything you can do in a loop because it is evaluated as an expression for example R.Where(item => item != R[0]); Will show you all items not equal to the first item. Here is why you can do anything with a linq expression: Enumerable.Range(1,1).Select(one => { // any function code you want here //return any type of variable. });

Categories : C#

Keeping slide-out div flush with left side of window upon window resize
Simply add: $(window).resize(function(e) { if ($("#slideout").css('left') != '0px') $("#slideout").css('left', -($("#slideout").width() - 15)); }); http://codepen.io/anon/full/rjaHD

Categories : Jquery

Android Crash, java.lang.IllegalArgumentException: Window type can not be changed after the window is added
check Androidmanifest.xml <uses-sdk //************ android:targetSdkVersion="X"/> X must be less than 14 Or remove this attribute. good luck guy.

Categories : Android

appending a script to head on both window.width and window.resize
Could you tell me if this code, to place in a javascript tag, works ? function appendScript(stickname){ var head = document.getElementsByTagName("head")[0]; var js = document.createElement("script"); js.type = "text/javascript"; js.src = "site/js/" + stickname + ".js"; head.appendChild(js); } (function(){ if ($(window).width() >= 768) { appendScript("stick");} else {appendScript("stick-mobile")} $(window).resize(function() { if ($(window).width() >= 768) { appendScript("stick");} else {appendScript("stick-mobile")} }); })(); And just a question: in appendScript(), shouldn't you also removeChild(...) the previous scripts ? And for that add a class on your script elements, to differentiate them ?

Categories : Javascript

chrome is opening window.open() in full window mode.
Maybe you can check your browser settings because I am in Chrome and the JSFiddle code worked perfectly fine for me. The browser opened with width 400 and height 200. Also, check your actual code to make sure it is the same as the one you posted.

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.