Search Results

Search found 741 results on 30 pages for 'caleb gray'.

Page 12/30 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Android Drawable question.

    - by Tarmon
    Hey Everyone, I am trying to create a drawable in code and change the color based on some criteria. I can get it to work but it doesn't want to let me set the padding on the view. Any help would be appreciated. <?xml version="1.0" encoding="utf-8"?> <ImageView android:id="@+id/icon" android:layout_width="50px" android:layout_height="fill_parent" /> <TextView android:id="@+id/label" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="17px" android:textSize="28sp" /> ImageView icon = (ImageView) row.findViewById(R.id.icon); ShapeDrawable mDrawable; int x = 0; int y = 0; int width = 50; int height = 50; float[] outerR = new float[] { 12, 12, 12, 12, 12, 12, 12, 12 }; mDrawable = new ShapeDrawable(new RoundRectShape(outerR, null, null)); mDrawable.setBounds(x, y+height, x + width, y); switch(position){ case 0: mDrawable.getPaint().setColor(0xffff0000); //Red break; case 1: mDrawable.getPaint().setColor(0xffff0000); //Red break; case 2: mDrawable.getPaint().setColor(0xff00c000); //Green break; case 3: mDrawable.getPaint().setColor(0xff00c000); //Green break; case 4: mDrawable.getPaint().setColor(0xff0000ff); //Blue break; case 5: mDrawable.getPaint().setColor(0xff0000ff); //Blue break; case 6: mDrawable.getPaint().setColor(0xff696969); //Gray break; case 7: mDrawable.getPaint().setColor(0xff696969); //Gray break; case 8: mDrawable.getPaint().setColor(0xffffff00); //Yellow break; case 9: mDrawable.getPaint().setColor(0xff8b4513); //Brown break; case 10: mDrawable.getPaint().setColor(0xff8b4513); //Brown break; case 11: mDrawable.getPaint().setColor(0xff8b4513); //Brown break; case 12: mDrawable.getPaint().setColor(0xffa020f0); //Purple break; case 13: mDrawable.getPaint().setColor(0xffff0000); //Red break; case 14: mDrawable.getPaint().setColor(0xffffd700); //Gold break; case 15: mDrawable.getPaint().setColor(0xffff6600); //Orange break; } icon.setBackgroundDrawable(mDrawable); icon.setPadding(5, 5, 5, 5); If I set the padding in XML it just ignores it. Thanks, Rob

    Read the article

  • Binary data instead of actual image in C#

    - by acadia
    Hello, I am using the below mentioned library to create a barcode which is storing in a specified location as shown below: My question is, is there a way instead of saving it to a png file I get byte data? thanks Code39 code = new Code39("10090"); code.Paint().Save("c:/NewBARCODE.png", ImageFormat.Png); using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using System.Diagnostics; namespace BarCode39 { public class Code39Settings { private int height = 60; public int BarCodeHeight { get { return height; } set { height = value; } } private bool drawText = true; public bool DrawText { get { return drawText; } set { drawText = value; } } private int leftMargin = 10; public int LeftMargin { get { return leftMargin; } set { leftMargin = value; } } private int rightMargin = 10; public int RightMargin { get { return rightMargin; } set { rightMargin = value; } } private int topMargin = 10; public int TopMargin { get { return topMargin; } set { topMargin = value; } } private int bottomMargin = 10; public int BottomMargin { get { return bottomMargin; } set { bottomMargin = value; } } private int interCharacterGap = 2; public int InterCharacterGap { get { return interCharacterGap; } set { interCharacterGap = value; } } private int wideWidth = 2; public int WideWidth { get { return wideWidth; } set { wideWidth = value; } } private int narrowWidth = 1; public int NarrowWidth { get { return narrowWidth; } set { narrowWidth = value; } } private Font font = new Font(FontFamily.GenericSansSerif, 12); public Font Font { get { return font; } set { font = value; } } private int codeToTextGapHeight = 10; public int BarCodeToTextGapHeight { get { return codeToTextGapHeight; } set { codeToTextGapHeight = value; } } } public class Code39 { #region Static initialization static Dictionary<char, Pattern> codes; static Code39() { object[][] chars = new object[][] { new object[] {'0', "n n n w w n w n n"}, new object[] {'1', "w n n w n n n n w"}, new object[] {'2', "n n w w n n n n w"}, new object[] {'3', "w n w w n n n n n"}, new object[] {'4', "n n n w w n n n w"}, new object[] {'5', "w n n w w n n n n"}, new object[] {'6', "n n w w w n n n n"}, new object[] {'7', "n n n w n n w n w"}, new object[] {'8', "w n n w n n w n n"}, new object[] {'9', "n n w w n n w n n"}, new object[] {'A', "w n n n n w n n w"}, new object[] {'B', "n n w n n w n n w"}, new object[] {'C', "w n w n n w n n n"}, new object[] {'D', "n n n n w w n n w"}, new object[] {'E', "w n n n w w n n n"}, new object[] {'F', "n n w n w w n n n"}, new object[] {'G', "n n n n n w w n w"}, new object[] {'H', "w n n n n w w n n"}, new object[] {'I', "n n w n n w w n n"}, new object[] {'J', "n n n n w w w n n"}, new object[] {'K', "w n n n n n n w w"}, new object[] {'L', "n n w n n n n w w"}, new object[] {'M', "w n w n n n n w n"}, new object[] {'N', "n n n n w n n w w"}, new object[] {'O', "w n n n w n n w n"}, new object[] {'P', "n n w n w n n w n"}, new object[] {'Q', "n n n n n n w w w"}, new object[] {'R', "w n n n n n w w n"}, new object[] {'S', "n n w n n n w w n"}, new object[] {'T', "n n n n w n w w n"}, new object[] {'U', "w w n n n n n n w"}, new object[] {'V', "n w w n n n n n w"}, new object[] {'W', "w w w n n n n n n"}, new object[] {'X', "n w n n w n n n w"}, new object[] {'Y', "w w n n w n n n n"}, new object[] {'Z', "n w w n w n n n n"}, new object[] {'-', "n w n n n n w n w"}, new object[] {'.', "w w n n n n w n n"}, new object[] {' ', "n w w n n n w n n"}, new object[] {'*', "n w n n w n w n n"}, new object[] {'$', "n w n w n w n n n"}, new object[] {'/', "n w n w n n n w n"}, new object[] {'+', "n w n n n w n w n"}, new object[] {'%', "n n n w n w n w n"} }; codes = new Dictionary<char, Pattern>(); foreach (object[] c in chars) codes.Add((char)c[0], Pattern.Parse((string)c[1])); } #endregion private static Pen pen = new Pen(Color.Black); private static Brush brush = Brushes.Black; private string code; private Code39Settings settings; public Code39(string code) : this(code, new Code39Settings()) { } public Code39(string code, Code39Settings settings) { foreach (char c in code) if (!codes.ContainsKey(c)) throw new ArgumentException("Invalid character encountered in specified code."); if (!code.StartsWith("*")) code = "*" + code; if (!code.EndsWith("*")) code = code + "*"; this.code = code; this.settings = settings; } public Bitmap Paint() { string code = this.code.Trim('*'); SizeF sizeCodeText = Graphics.FromImage(new Bitmap(1, 1)).MeasureString(code, settings.Font); int w = settings.LeftMargin + settings.RightMargin; foreach (char c in this.code) w += codes[c].GetWidth(settings) + settings.InterCharacterGap; w -= settings.InterCharacterGap; int h = settings.TopMargin + settings.BottomMargin + settings.BarCodeHeight; if (settings.DrawText) h += settings.BarCodeToTextGapHeight + (int)sizeCodeText.Height; Bitmap bmp = new Bitmap(w, h, PixelFormat.Format32bppArgb); Graphics g = Graphics.FromImage(bmp); int left = settings.LeftMargin; foreach (char c in this.code) left += codes[c].Paint(settings, g, left) + settings.InterCharacterGap; if (settings.DrawText) { int tX = settings.LeftMargin + (w - settings.LeftMargin - settings.RightMargin - (int)sizeCodeText.Width) / 2; if (tX < 0) tX = 0; int tY = settings.TopMargin + settings.BarCodeHeight + settings.BarCodeToTextGapHeight; g.DrawString(code, settings.Font, brush, tX, tY); } return bmp; } private class Pattern { private bool[] nw = new bool[9]; public static Pattern Parse(string s) { Debug.Assert(s != null); s = s.Replace(" ", "").ToLower(); Debug.Assert(s.Length == 9); Debug.Assert(s.Replace("n", "").Replace("w", "").Length == 0); Pattern p = new Pattern(); int i = 0; foreach (char c in s) p.nw[i++] = c == 'w'; return p; } public int GetWidth(Code39Settings settings) { int width = 0; for (int i = 0; i < 9; i++) width += (nw[i] ? settings.WideWidth : settings.NarrowWidth); return width; } public int Paint(Code39Settings settings, Graphics g, int left) { #if DEBUG Rectangle gray = new Rectangle(left, 0, GetWidth(settings), settings.BarCodeHeight + settings.TopMargin + settings.BottomMargin); g.FillRectangle(Brushes.Gray, gray); #endif int x = left; int w = 0; for (int i = 0; i < 9; i++) { int width = (nw[i] ? settings.WideWidth : settings.NarrowWidth); if (i % 2 == 0) { Rectangle r = new Rectangle(x, settings.TopMargin, width, settings.BarCodeHeight); g.FillRectangle(brush, r); } x += width; w += width; } return w; } } } }

    Read the article

  • eclipse galileo not responding ubuntu 64-bit

    - by Agent1891
    I'm having a problem with eclipse galileo on ubuntu 64-bit system. when ever i open it the splash scree turns gray but keeps loading and then when eclipse opens it shows the secure storage password request and hangs. I dont know what could be wrong, it used to work fine before, if you have or had the same problem please tell me what to do

    Read the article

  • White disclosure indicator

    - by Knodel
    In my app I have a UITableView with a UITableViewCellAccessoryDisclosureIndicator. I don't want to change the whole indicator, but I want to make it white instead of gray. How can I do it? Thanks in advance!

    Read the article

  • SetBackground and setForeGround not working in QTableWidgetItem

    - by liaK
    Hi I am using QTableWidget and QTableWidgetItem to populate QTableWidget. When i try to set the background and foreground for QTableWidgetItem, it's not displaying the set background and foreground colors. I am using Qt4.4 . My code looks like this lcurrentTableWidgetItem-setForeground(Qt::blue); lcurrentTableWidgetItem-setBackground(Qt::gray); Someone can help me with this.

    Read the article

  • NSColor transparency on black background?

    - by Alex Zielenski
    In the background of my view, I draw a light blue color. And in the middle, i have a square box that is supposed to have an even lighter gray in it that has a 20% transparency. But for some reason the transparency is on top of a black background instead of a blue. I'm sorry If i'm not being clear.

    Read the article

  • How can I make kml data in google earth look like google maps?

    - by celenius
    I have a program that generates a .shp file, and exports this as a kml file. I would like to be able to display my output using the standard google map 'map' style (gray background, yellow streets, etc) in google earth. Is there a style guide or method that I should be using? Any thoughts appreciated - I wasn't sure how to structure this question. Thank you.

    Read the article

  • How can I make kml data look like google maps?

    - by celenius
    I have a program that generates a .shp file, and exports this as a kml file. I would like to be able to display my output using the standard google map 'map' style (gray background, yellow streets, etc) in google earth, or in the google earth api. Is there a style guide or method that I should be using? Any thoughts appreciated - I wasn't sure how to structure this question. Thank you.

    Read the article

  • How do I make an HTML text box show a hint when empty?

    - by Michael L Perry
    I want the search box on my web page to display the word "Search" in gray italics. When the box receives focus, it should look just like an empty text box. If there is already text in it, it should display the text normally (black, non-italics). This will help me avoid clutter by removing the label. BTW, this is an on-page AJAX search, so it has no button.

    Read the article

  • jQuery delete text onfocus

    - by phillip usa
    hey, ive been trying to have a default value in a text input, then with jQuery, when you "onfocus" the textbox, it makes the text black (default a light gray), and deletes the default value. I think you know what im talking about, so do you guys know how to accomplish this?

    Read the article

  • NSArrayController binding : Suppress "No selection"

    - by Holli
    Hello, I have a texfield bound to an ArrayController. The controller key is "selection" because I select items from a NSTableView. But when there are no items in the table the textfield shows the gray text "no selection". How can I suppress this text and have just an empty textfield? Or how can I change the "No selection" text to something else?

    Read the article

  • Change table view ( style grouped ) background color ?

    - by Madhup
    Hi all, I am developing an iPad application in which I need a table view ( style grouped ) having background color as clearColor. My problem is [self.tableView setBackgroundColor:[UIColor clearColor]]; works well if the table view style is plain but when I switch to group table view the background color does not changes it stays gray in color. FYI: the contentview background color of tableviewcell also does not change. Is this a bug in iPhone-sdk or I am doing something wrong. Thanks, Madhup

    Read the article

  • Create Embedded Resources problem

    - by Night Walker
    I am trying to add an Embedded Resource I am doing it like it is written in following tutorial http://msdn.microsoft.com/en-us/library/e2c9s1d7%28VS.80%29.aspx But I cant the Persistence property from Linked at compile time To Embedded in .resx It always gray at Linked at compile time . Any idea why i have this problem ? Thanks .

    Read the article

  • Any good source of explanatory documentation on ColorMatrix?

    - by mackenir
    I'd like to try using ColorMatrix, but am only able to find examples that convert an image to grayscale. And even then, they tend to be presented as a chunk of 'magic numbers' code with no explanation. Does anyone know of a 'tutorial' on how to use ColorMatrix? For example I'd be interested in converting a grayscale image to a color image, where white == transparent, and black = a solid color, with gray pixels somewhere in between. Could ColorMatrix do that?

    Read the article

  • How Do I Create Expand All and Collapse All Links Outside of the jQuery Treeview Plugin?

    - by Ben Griswold
    The jQuery Treeview Plugin adds Collapse All, Expand All and Toggle All links to the "treeviewcontrol" div when the control property is defined as follows: $("#black, #gray").treeview({ control: "#treecontrol", persist: "cookie", cookieId: "treeview-black" }); This works great, but I'd like the ability to expand and collapse the treeview from other page elements outside of the treeview itself. I've looked at the source, but I can't figure it out.

    Read the article

  • Ajax Tabs implementation problem .

    - by SmartDev
    Hi , I have Implement ajax tabs and i have four tabs in it . In the four tabs i have four grid views with paging and sorting .The tabs are looking good i can see the grid ,but the problem is my first tab sorting works fine, where if i click on any other tab and click on the grid it goes to my first tab again . One more thing i want to change the background color of each tab. Can anyone help please here is my source code: <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:ScriptManager ID="ScMMyTabs" runat="server"> </asp:ScriptManager> <cc1:TabContainer ID="TCMytabs" ActiveTabIndex="0" runat="server"> <cc1:TabPanel ID="TpMyreq" runat="server" CssClass="TabBackground" HeaderText="My request"> <ContentTemplate> <table> <tr> <td> <asp:Button ID="btnexportMyRequestCsu" runat="server" Text="Export To Excel" CssClass="LabelDisplay" OnClick="btnexportMyRequestCsu_Click" /> </td> </tr> <tr> <td> <asp:GridView ID="GdvMyrequest" runat="server" CssClass="Mytabs" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" OnPageIndexChanging="GdvMyrequest_PageIndexChanging" OnSorting="GdvMyrequest_Sorting" EmptyDataText="No request found for this user"> <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <PagerStyle BackColor="Control" ForeColor="Gray" HorizontalAlign="Left" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <PagerSettings Position="TopAndBottom" /> <Columns> <asp:TemplateField> <HeaderTemplate> Row No </HeaderTemplate> <ItemTemplate> <%# Container.DataItemIndex + 1 %> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </td> </tr> <tr> <td> <asp:Label ID="lblmessmyrequestAhk" runat="server" CssClass="labelmess"></asp:Label> </td> </tr> </table> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="TpMyPaymentCc" runat="server" HeaderText="Payments Credit Card" > <ContentTemplate> <table> <tr> <td> <asp:GridView ID="GdvmypaymentsCc" runat="server" CssClass="Mytabs" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" OnPageIndexChanging="GdvmypaymentsCc_PageIndexChanging" OnSorting="GdvmypaymentsCc_Sorting" EmptyDataText="No Data"> <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <PagerStyle BackColor="Control" ForeColor="Gray" HorizontalAlign="Left" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <PagerSettings Position="TopAndBottom" /> </asp:GridView> </td> </tr> <tr> <td> <asp:Label ID="lblmessmypaymentsCsu" runat="server" CssClass="labelmess"></asp:Label> </td> </tr> </table> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="TpMyPaymentsCk" runat="server" HeaderText="Payments Check" > <ContentTemplate> <asp:GridView ID="GdvmypaymentsCk" runat="server" CssClass="Mytabs" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" OnPageIndexChanging="GdvmypaymentsCk_PageIndexChanging" OnSorting="GdvmypaymentsCk_Sorting" EmptyDataText="No Data"> <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <PagerStyle BackColor="Control" ForeColor="Gray" HorizontalAlign="Left" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <PagerSettings Position="TopAndBottom" /> </asp:GridView> </ContentTemplate> </cc1:TabPanel> <cc1:TabPanel ID="TpMyCalls" runat="server" HeaderText="Calls" > <ContentTemplate> <table> <tr> <td> <asp:GridView ID="GdvSelectcallsP" runat="server" CssClass="Mytabs" BackColor="White" BorderColor="White" BorderStyle="Ridge" BorderWidth="2px" CellPadding="3" CellSpacing="1" GridLines="None" OnPageIndexChanging="GdvSelectcallsP_PageIndexChanging" OnRowDataBound="GdvSelectcallsP_RowDataBound" OnSorting="GdvSelectcallsP_Sorting" > <RowStyle BackColor="#DEDFDE" ForeColor="Black" /> <FooterStyle BackColor="#C6C3C6" ForeColor="Black" /> <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" /> <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" /> <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /> <Columns> <asp:TemplateField> <HeaderTemplate> Row No </HeaderTemplate> <ItemTemplate> <%# Container.DataItemIndex + 1 %> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </td> </tr> <tr> <td> <asp:Label ID="lblmessselectcallsAhkP" runat="server" CssClass="labelmess"></asp:Label> </td> </tr> </table> </ContentTemplate> </cc1:TabPanel> </cc1:TabContainer> </asp:Content>

    Read the article

  • background-color:#070707; different in photoshop than in browser

    - by Jorre
    I'm coding a website with: background-color:#070707; That color should be a very dark gray, just the way I see it in photoshop. Now when I launch this in my browser (the background-color is set on the body using CSS, so it's not an exported image), the color is darker than in Photoshop. I know there can be differences when exporting images due to color profiling, but when setting the color code, how can this be different from photoshop? Thanks a lot for helping

    Read the article

  • Edge detection using wavelet

    - by cheoma
    I had done Edge detection using wavelet transform using thus steps changing the image to Gray scale decomposing the image using dwt2(discrete wavelet transform,Haar wavelet filter ) in to horizontal,vertical,diagonal and approximation(detail) further decomposing the horizontal part threshold (global threshold like canny Edge detection ) i got the edge but i got a problem while locating the edge to complete image to mean recovering original image using only the Edges so i need help concerning this either in concept ,mat lab code or references I hope i will get your help soon

    Read the article

  • Tunning up Activity with dialog theme

    - by Gaks
    I need to launch a Dialog from home screen widget, so I created an Activity with android:theme="@android:style/Theme.Dialog" The problem is, that I would like make it look like standard dialog window ( buttons on the gray background, font and text size, paddings etc), like here: This is how my "dialog" Activity looks like: Is there some standard way (theme?) to make it look like standard system dialogs? Or do I have to imitate it in my own layout?

    Read the article

  • Set inner table border in HTML

    - by ripper234
    How do I set the "inner border" - the border between different cells. By setting style attributes I manage to control the outer border, but the inner border just stays the same gray color and the same width. What attributes should I tweak to control the inner border?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >