w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to change filter icon color or filter icon when column is filtered
This is supported out-of-the-box. Take a closer look at the demos when you filter change the theme if needed. Or modify the CSS of a particular theme to make it more clearly visible.

Categories : Kendo Ui

Change color of icon on condition
Your first step is to validate that the field isn't blank (and, well, valid) and unfortunately you need to do this part with javascript. To change the icon / label, I recommend you apply these changes by using javascript to add a "valid" class after you're sure the field isn't empty. You didn't show us your current code, but if you have a simple form like <label for="username"> <i class="icon-user" alt="Username"></i> </label> <input id="username" type="text"> which uses an icon for the label, your css might look like label .icon-user:before { color: gray; content: "u"; // ... or whatever the corresponding symbol font-family: 'icomoon'; // assuming you're using an icon font } label.valid .icon-user:before { color: green; } As the user mo

Categories : CSS

Change actionbar color programmatically more than once
this is a quick fix that i found mActionBar.setBackgroundDrawable(new ColorDrawable(0xff00DDED)); mActionBar.setDisplayShowTitleEnabled(false); mActionBar.setDisplayShowTitleEnabled(true);

Categories : Android

Change ActionBar tab color programmatically
You can change ActionBar's background color by defining custom style, as: <resources> <style name="MyTheme" parent="@android:style/Theme.Holo.Light"> <item name="android:actionBarStyle">@style/MyActionBar</item> </style> <style name="MyActionBar" parent="@android:style/Widget.Holo.Light.ActionBar"> <item name="android:background">ANY_HEX_COLOR_CODE</item> </style> </resources> go to: http://jgilfelt.github.io/android-actionbarstylegenerator/#name=example&compat=holo&theme=light&actionbarstyle=solid&texture=0&hairline=0&backColor=E4E4E4%2C100&secondaryColor=D6D6D6%2C100&tabColor=33B5E5%2C100&tertiaryColor=F2F2F2%2C100&accentColor=33B5E5%2C100&cabBackColo

Categories : Java

How can I programmatically change the value of a color in colors.xml?
It would help if you described why and how you are using this dynamic color, and why you want to do this at runtime instead of build time. But assuming it has to be the way you asked... I suggest writing a helper function that all places can call and set them. public int getMyColor(...) { // figure out which color to use, via a database call, // an asset load, some algorithm, or whatever you need ... // once color chosen, create an RGBA integer for it final int myColor = ... return myColor; } Now call this on every activity/fragment that needs it and set the color attribute(s) on the appropriate views as needed. (With View.setBackgroundColor(...), etc.) However, to allow this to work in XML settings and/or development layout previews, you would have to write

Categories : Android

Programmatically change folder read only flag using C#
I found two posts related to the same problem Post 1 Post 2 Post 2 suggests that the first one is not correct, but the answer to post 1 has many upvotes Let us know which answer worked for you

Categories : C#

How to change the Border Background Color in a ItemContainerStyle programmatically?
I could fix this Issue with the ItemContainerGenerator: private void ColorB_OnClick(object sender, RoutedEventArgs e) { //TODO: Do this for all Items and not only for the "Selected Item" TreeViewItem tvi = lstDbTree.ItemContainerGenerator.ContainerFromItem(lstDbTree.SelectedItem) as TreeViewItem; Border brd = (Border)tvi.Template.FindName("SelectedRectangle", tvi); brd.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#7B7A7C")); }

Categories : Wpf

Is it possible to change the black background color of android app drawer programmatically?
Here is an example for your requirement (programatically): redBtn.setOnTouchListener(new OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { // TODO Auto-generated method stub Log.d("MYAPP", "RED touched.."); setActivityBackgroundColor(Color.RED); return false; } }); The function defination for setActivityBackgroundColor(); is given below: public void setActivityBackgroundColor(int color) { View view = this.getWindow().getDecorView(); view.setBackgroundColor(color); } This worked for me, you can modify same as per your requirement. Accept the answer if it meets your requirement. -Regards

Categories : Android

jquery mobile - programmatically change radio button color
Select the next <label> and then its <span> children: $('#cur2') .next('label') .children('span') .css('background-color', 'red'); Fiddle

Categories : Jquery

Customizing change Text and Background Color of row Item programmatically in Android
it doesn't work because the children of a listview are being re-used each time you scroll. you should either update the data and call notifyDataSetChanged , or update the data and use something like: int visiblePosition = mListView.getFirstVisiblePosition(); View view = mListView.getChildAt(position - visiblePosition); if(view!=null) { // update the view to have a different background and other stuff... } notes about the second way: on some adapterViews the second way might not work as expected. i'm not sure what will happen when changing the size of the view .

Categories : Android

How do I programmatically change the color behind a pager or repeaters select page number?
UserControl ASPX: <p> Page <asp:Label ID="currentPageLabel" runat="server" /> of <asp:Label ID="howManyPagesLabel" runat="server" /> | <asp:HyperLink ID="previousLink" Runat="server">Previous</asp:HyperLink> <asp:Repeater ID="pagesRepeater" runat="server" onitemdatabound="pagesRepeater_ItemDataBound"> <ItemTemplate> <asp:HyperLink ID="hyperlink" runat="server" Text='<%# Eval("Page") %>' NavigateUrl='<%# Eval("Url") %>' /> </ItemTemplate> </asp:Repeater> <asp:HyperLink ID="nextLink" Runat="server">Next</asp:HyperLink> </p> UserControl Code behind: public class p { public string Page { get; set; } public string Url { get; set; } public p(string url, stri

Categories : C#

How to use DriveApp to change folder color?
As you've found, you cannot get or set the color of a folder (or file) through DriveApp (nor the DocsList Class). The Drive SDK does not provide access to these either, so it's not possible to code a work-around using that API. You may wish to add an issue to the Google Apps Script Issue Tracker, requesting support for this capability.

Categories : Google Apps Script

How to change header background color of Dynamic Table Report of gotreportviewer programmatically
Please replace the below code in TableRdlGenerator.cs (line 110) private Rdl.StyleType CreateHeaderTableCellTextboxStyle() { Rdl.StyleType headerTableCellTextboxStyle = new Rdl.StyleType(); headerTableCellTextboxStyle.Items = new object[] { "700", "14pt" }; headerTableCellTextboxStyle.ItemsElementName = new Rdl.ItemsChoiceType5[] { Rdl.ItemsChoiceType5.FontWeight, Rdl.ItemsChoiceType5.FontSize }; return headerTableCellTextboxStyle; } with private Rdl.StyleType CreateHeaderTableCellTextboxStyle() { Rdl.StyleType headerTableCellTextboxStyle = new Rdl.StyleType();

Categories : C#

Dynamically change action bar divider color (android:bottom for programmatically generated ShapeDrawable)?
If you can elaborate as to what reason you are changing the color programmatically? It seems a little pointless to do this if you are not also controlling the background color. If you are controlling the background color then you are probably using styles in which case I can think of several methods of doing this. Simon

Categories : Android

Change the icon of google marker and use image from project image folder
Refer to the following URL, there are examples here https://developers.google.com/maps/documentation/javascript/overlays#Icons You can just say 'image/marker.png'

Categories : Misc

Change application taskbar icon at run time(ignore shortcut icon)
Shortcuts have nothing to do with how the application icon appears on the taskbar, a shortcut only points to the actual executable that has the icon embedded as a resource. Your problem could be the Windows Icon Cache. This is a common scenario where the Icon Cache isn't updated properly. You should rebuild/refresh your icon cache, then you should see the currently loaded application icon appear on the taskbar, and you can then use the Application.Icon.Load... to swap the icons between modes. It could also be just due to your taskbar options. If you have your taskbar set to combine both Icon + Label then the icon does not change. Make sure that the option is set to don't combine or combine only if taskbar is full.

Categories : Delphi

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

Programmatically add icon to the home screen
Here's the basic code to create tiles on start: // check if secondary tile is already made and pinned ShellTile Tile = ShellTile.ActiveTiles.FirstOrDefault(x => x.NavigationUri.ToString().Contains("Title=SecondaryTile")); if (Tile == null) { // create a new secondary tile StandardTileData data = new StandardTileData(); // tile foreground data data.Title = "Secondary tile"; data.BackgroundImage = new Uri("/Images/Blue.jpg", UriKind.Relative); data.Count = 2; // create a new tile for this Second Page ShellTile.Create(new Uri("/SecondPage.xaml?Title=SecondaryTile", UriKind.Relative), data); You'll need to navigate it to your desired page, then use the WebBrowserTask to go to the desired web page. Hope that helps.

Categories : Android

edit icon at a specific resolution programmatically
What you are asking is: How to programmatically create a multi-icon? The standard Icon class of .NET doesn't provide any capability to do this just because .NET doesn't have a ICON encoder, see this article for the proof. BTW you can create a multiIcon just creating your own encoder, luckily you don't need to do this since there are some good samaritans that have already did it. Some link that can be usefull: read/write multi icon in a single file VB examples thread Another .NET library Hope this helps.

Categories : C#

How to add ContextMenu to the system tray icon programmatically?
Context menu on right-click is automatic, no need to handle it. Just build your menu and assign it to NotifyIcon.ContextMenu.

Categories : C#

How to programmatically access an Eclipse JDT tooltip icon
You are looking for org.eclipse.jdt.internal.ui.JavaPluginImages.IMG_OBJS_QUICK_ASSIST. A code snippet like JavaPluginImages.get(JavaPluginImages.IMG_OBJS_QUICK_ASSIST) should do the trick. (JavaPluginImages is not API hence you will get a warning in your code, but you can just ignore that)

Categories : Eclipse

android: Animate color change from color to color
You can use a ValueAnimator: //animate from your current color to red ValueAnimator anim = ValueAnimator.ofInt(view.getBackgroundColor(), Color.parseColor("#FF0000")); anim.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { view.setBackgroundColor(animation.getAnimatedValue()); } }); anim.start(); You can also set duration or other parameters before calling anim.start(). For example: anim.setDuration(400); will set the animation duration to 400ms. Finally, note that ValueAnimator is available starting in Honeycomb, so if you are supporting older SDKs, you can use NineOldAndroids.

Categories : Android

How to hide an extension's Browser Action icon programmatically in a popup.html?
Currently it's not possible to programatically hide the browser action button. There's a feature request to implement this feature through the chrome.management API, star it at https://code.google.com/p/chromium/issues/detail?id=260281 if you want to get notified of updates.

Categories : Javascript

What color should have an icon when used in Action Bar
PNG files support alpha channel (opacity). If you're really struggling, you can use the Action Bar and Tab Icon Generator (it's maintained by the official Android Design Team) to automatically generate assets for every screen density and with proper opacity values.

Categories : Android

Changing mac folder icon with Ruby?
It's been years since I played with them, but .icon files' format were documented by Apple's documentation and Wikepedia. If I remember right, the name has a trailing " " to make it harder to type, but that's easily handled from code. You should be able to use the normal File.rename method to move an .icon file into a folder, and the Finder should do the right thing. Looking at your code, I'd do some things differently: require 'fileutils' def set_icon image, folder # Convert to absolute paths and setup image = File.expand_path image folder = File.expand_path folder temp = File.join(folder, 'temp2' + File.extname(image)) # Copy image FileUtils.cp(image, temp) # Take an image and make the image its own icon system "sips -Z 512 -i #{ temp }" # E

Categories : Ruby

how to Get System Icon for any file/folder
You could have easily found on google. http://www.codeproject.com/Articles/2532/Obtaining-and-managing-file-and-folder-icons-using

Categories : C#

Using a Canvas as an icon with bindable color
Too long for comment, so I will write here: If I understand correctly, SubmitVisualIcon is a Resource. Resource Binding does not support, so you do not work Binding with TemplatedParent, because the Resource is not part of the visual tree, or part of the template. Probably you'll have to look for an alternative. As an alternative, you can use the settings that are supported by the application. Set the color in the settings, and reference it in the resource like that: xmlns:properties="clr-namespace:MyNamespace.Properties" <Path Fill="{Binding Source={x:Static properties:Settings.Default}, Path=SomeColor, Mode=TwoWay}" ... /> More information can be found here and here.

Categories : Wpf

Is it possible to color the fontawesome icon colors?
All you need is to set color: yellow. Because the icons are a font, they will take whatever colour you'd set to any other font (text) in the same way. if you want to fill the whole star as yellow, try icon-star instead of icon-star-empty you can try this -webkit-text-stroke-width: 1px; -webkit-text-stroke-color: orange; to add stroke (outline) to the font itself. I hope thats what you are looking for. and to fill it just use the normal color: yellow;

Categories : CSS

Python messing up my windows folder icon
This can be caused by many things, but my guess is that when you copy all files from a folder, you also copy the Desktop.ini file that contains desktop configuration. That way, you already overwrite the previous folder configuration (which includes the folder's icon) Try doing something like that: def get_all_files_from(my_path): """return all filename in a folder, without their path""" file_list_without_path = [ f for f in listdir(my_path) if isfile(join(my_path,f)) and 'Desktop.ini' not in f ] return file_list_without_path More information about Desktop.ini.

Categories : Python

Android dynamic views generated with grey color. Can't change radiobutton color
I found the solution. Just not using the Context and create all the views like this one: RadioButton tv2 = new RadioButton(this); Just replacing tContext for this

Categories : Android

Change drawable start color and end color dynamically in android activity class
Yes, it is possible. You should use GradientDrawable to do this. int colors[] = { 0xff255779, 0xffa6c0cd }; GradientDrawable gradientDrawable = new GradientDrawable( GradientDrawable.Orientation.TOP_BOTTOM, colors); view.setBackgroundDrawable(gradientDrawable); Change color code as per your requirement. Though I used Color.parseColor("color code"), its not working. There are some option for Orientation like following. GradientDrawable.Orientation.BOTTOM_TOP; GradientDrawable.Orientation.LEFT_RIGHT; GradientDrawable.Orientation.RIGHT_LEFT;

Categories : Android

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

Icon color masking with HTML5 Canvas
//now working for both image and bg image. // note:: cross domain image path will not be working. <!doctype HTML> <html lang="pt-BR"> <head> <meta charset="UTF-8" /> <title>Change BG image color</title> </head> <body> <div id="mugBG">BG IMAGE</div> <style type="text/css">#mugBG{width:200px; height:213px; line-height:213px; background:url(your-image-path.png) no-repeat 0 0; text-align:center; }</style> <img src="your-image-path.png" id="mug" alt="your-image-path.png" width="200" height="213"> <input type="text" id="color" value

Categories : Javascript

Set system tray notifyicon.icon to a pic in images folder
After adding the picture file to your project, bring up the item properties by clicking on it, and pressing F4. Under Build Action, change it to "Embedded Resource". You can access embedded resources in Stream form like this: public FolderMonitorApplicationContext() { this.monitor = new Monitor(); notifyIcon = new NotifyIcon(); using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream( "<project namespace>.<folder path>" + "filename.ico")) { notifyIcon.Icon = new Icon(stream); } notifyIcon.Text = "Folder Monitor"; notifyIcon.Visible = true; contextMenu = new ContextMenuStrip(); openMonitor = new ToolStripMenuItem(); exitApplication = new ToolStripMenuItem(); notifyIcon.ContextMenuStrip = con

Categories : C#

Color to transparency - programmatically
If you want to replace the pixel of a given color by "transparent" pixels, you have (1) to test if a given pixel has the required color (2) set it "transparent" by setting alpha to 0. Something like that would do the trick: for x in range(0, _i.size[0]): for y in range(0, _i.size[1]): col = list(_ii[x, y]) if col[0:3] == my_key_color[0:3]: _oo[x,y] = col[0:3]+(0,) # keep RGB, set A to 0 else: _oo[x,y] = col Please note this is a very basic solution where a pixel is either fully transparent -- or leaved as-is. If you looking for more "professional" effect, you will have te refine this a little...

Categories : Python

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

Create Source Folder Programmatically
When you called javaProject.getPackageFragmentRoot(), you created a build path for the project using itself as the source folder. Skip it, you can just get the project-relative path from your IFolder instance and make your newSourceEntry from that.

Categories : Java

3-Color Scale to change color in different columns from data in another column
Based on Excel 2007 (but you've waited a while for any other response) you may notice that if you use Format Painter to copy the colour scale to your First Name and Last Name columns their highlighting did not change. However I think you will find that if you then, temporarily, replace a name with a number highlighting is acquired. The conditional formatting rules have been copied by Format Painter but there is no visible change. The reason I think is because the colour scales are numeric and simply are not applicable to names. If you want to copy the colours you will probably need VBA (though your question is not tagged with that).

Categories : Excel

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

What does the yellow color warning icon mean in Symfony2 web profiler?
It's the number of request to the database (did by your orm). You can reduce this by using join and an Entity repository instead of using the default method find*. The reason is doctrine are automaticly using select to access many to one relation. By using join you dont give the choice to doctrine. Example : $qb = $this->_em->createQueryBuilder(); $qb->select('u, p') ->from($this->_entityName, 'u') ->leftJoin('u.profile', 'p');

Categories : Symfony2



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