Search Results

Search found 4668 results on 187 pages for 'font'.

Page 99/187 | < Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >

  • Text Getting weird when jquery animate fade on chrome

    - by Robson Silveira
    JavaScript $(function() { $('#lol').hover(function() { $(this).stop().animate({opacity:0.5}); },function() { $(this).stop().animate({opacity:1}); }); }); CSS #lol { padding:20px; background-color:#FF0000; color:#FFF; font-size:15px; font-family:arial; width:300px; opacity:1; filter:alpha(opacity=100); position:relative; } HTML <div id="lol">text</div> In Firefox and Internet Explorer it works fine but in Chrome, the text get weird on fade -- it look like that text is losing cleartype. How can I fix it? How it looks on fade: Click to see

    Read the article

  • How can I draw a Rectangle on a PictureBox?

    - by TooFat
    I am trying to just draw a Rectangle on a PictureBox that is on a Form. Writing text like shown here works fine. private void pictureBox1_Paint(object sender, PaintEventArgs e) { using (Font myFont = new Font("Arial", 14)) { e.Graphics.DrawString("Hello .NET Guide!", myFont, Brushes.Green, new Point(2, 2)); } } but when I try to draw a rectangle like so nothing shows up. private void pictureBox1_Paint(object sender, PaintEventArgs e) { Rectangle rect = new Rectangle(); rect.Location = new Point(25, 25); rect.Width = 50; using (Pen pen = new Pen(Color.Red, 2)) { e.Graphics.DrawRectangle(pen, rect); } } What am I missing?

    Read the article

  • Overwrite values when using gridview Edit?

    - by sah302
    I am using a GridView which is bound to a LinqDataSource and using the automatic edit and delete buttons. However, I don't want the user to edit two of the columns manually, but done automatically. Specifically username who last updated the entry, and the date it was updated. The gridview only contains 3 columns: Name, Date modified, last updated by. Right now when the user clicks the edit button they can only edit the name column (other two set to read-only). Upon clicking the update button, I want the other 2 fields to update as well based on some extra code. I thought this was done in the code behind within the event rowUpdating, but it doesn't seem to work. My gridview: <asp:GridView ID="gvNewsSources" runat="server" AutoGenerateColumns="False" DataSourceID="ldsNewsSource" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" CellPadding="4" ForeColor="#333333" GridLines="None" DataKeyNames="Id"> <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <Columns> <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" /> <asp:BoundField DataField="LastUpdatedBy" HeaderText="Last Updated By" SortExpression="LastUpdatedBy" ReadOnly="True" /> <asp:BoundField DataField="DatedModified" HeaderText="Dated Modified" SortExpression="DatedModified" ReadOnly="True" /> </Columns> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#999999" /> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> </asp:GridView> My code behind: Partial Class _Default Inherits System.Web.UI.Page Protected Sub gvNewsSources_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles gvNewsSources.RowUpdating e.NewValues("LastUpdatedBy") = GetUser.GetUserName e.NewValues("DateModified") = Date.Now() lblOutput.Text = e.NewValues("DateModified").ToString() End Sub End Class Yet when I run through this, I get no errors, but the values aren't being updated in the database or in the gridview. I ran through debug mode and the new values dictionary starts at 1 and ends up being 3 by the end of the rowUpdating event and the value is being set (tested by output the newValue of Datemodified), but it isn't saving. What am I doing wrong?

    Read the article

  • Regular expression only for website

    - by Katie
    HI, I'm new to Regular Expression. I need to find just website in some text and I'm looking for a regular expression able to find out strings like: www.my.home, http://my.site.it But this regular expression should not find strings like: [email protected] or if the website is already inside html tag <a href="http://www.my.site.com/"><span style="font-style: normal;">www.mambo-test.org</span></a> I tried with this one: \b((https?://[^ ])|(www.[^ ])) but it also finds the website in the href and between the tag: <a href="http://www.my.site.com/"><span style="font-style: normal;">www.mambo-test.org</span></a> and I don't know how except this case.

    Read the article

  • convert int to string for use in allegro function

    - by ace
    I am trying to run the following code using allegro. textout_ex(screen, font, numbComments , 100, 100, GREEN, BLACK); numbComments is an integer, the function prototype of this function is void textout_ex(BITMAP *bmp, const FONT *f, const char *s, int x, int y, int color, int bg); and i cannot, according to my understanding pass this integer in the third position. I therefore need to convert the integer into a string. I did it like this, but it didnt work. Help please? int score = numbComments; string Str; stringstream out; // YOU MUST INCLUDE <sstream> FOR THIS. out << score; Str = out.str(); and then tried to use the string Str, which didnt work

    Read the article

  • Using Typeface.js within a GWT app

    - by dindeman
    I am looking for some sample Java code demonstrating how to get AJAX content displayed into a custom font using Typeface.js within a GWT app. I have tried a little bit by calling the following native function native void Typeface_renderDocument() /*-{ $wnd._typeface_js.renderDocument(); }-*/; after having filled the relevant widget with the AJAX content, and after calling the following function on the widget : void applyTypeface(Widget widget) { widget.addStyleName("typeface-js"); widget.getElement().getStyle().setProperty("fontFamily", "Helvetiker"); Typeface_renderDocument(); } ...where Helvetiker is a custom font (actually available from Typeface.js fonts page (http://typeface.neocracy.org/fonts.html). But that didn't work. I am looking forward to any suggestions since I am bit stuck here. Alternatively I would be interested in an example using cufón within GWT, although I am not so keen about the replacement by images that cufón does (which is the main reason why I was trying to use Typeface.js.)

    Read the article

  • Compact Framework - ListView like control ?

    - by no9
    Hello. I have been playing with Compact Framework lately and i need some advice. I have a collection of items. One of the properties on each item is a string type that holds XML. This XML defines image, font, style etc... Im looking for a control (similar to listView) that would replace listBox control. Im not satisfied with listView control, because it is very limited on items level. The control has to be dynamic enough so that my parser could parse the XML and customise the control. For a start i would like to show an image and perhaps some font styles for each row in the control. Here is a sample what im trying to achieve: Any suggestions?

    Read the article

  • Can jQuery animate() behave differently for specific elements within my selection?

    - by Sune Rasmussen
    I have a selection of elements in a jQuery object. I want to animate their font sizes, but as I have both the headlines and various paragraphs in the selection, they should be animated slightly differently, as the headlines should end up with a larger font size than the paragraphs. I already have this information stored in the jQuery data cache. I can do that. But, not unless I use several calls to the animate function, one for each specific, slightly different animation, perhaps using event triggering or setTimeout() calls. Of course I want to avoid this, as it's damn ugly and an odd way around. Much prettier if it could be done internally, within the animation ... Any help would be much appreciated.

    Read the article

  • How to keep a local value from being set when a binding fails (so inherited values will propagate)

    - by redoced
    Consider the following scenario: I want to bind the TextElement.FontWeight property to an xml attribute. The xml looks somewhat like this and has arbitrary depth. <text font-weight="bold"> bold text here <inlinetext>more bold text</inlinetext> even more bold text </text> I use hierarchical templating to display the text, no problem there, but having a Setter in the template style like: <Setter Property="TextElement.FontWeight" Value="{Binding XPath=@font-weight}"/> sets the fontweight correctly on the first level, but overwrites the second level with null (as the binding can't find the xpath) which reverts to Fontweight normal. I tried all sorts of things here but nothing quite seems to work. e.g. i used a converter to return UnsetValue, which didn't work. I'm currently trying with: <Setter Property="custom:AttributeInserter.Wrapper" Value="{custom:AttributeInserter Property=TextElement.FontWeight, Binding={Binding XPath=@font-weight}}"/> Codebehind: public static class AttributeInserter { public static AttributeInserterExtension GetWrapper(DependencyObject obj) { return (AttributeInserterExtension)obj.GetValue(WrapperProperty); } public static void SetWrapper(DependencyObject obj, AttributeInserterExtension value) { obj.SetValue(WrapperProperty, value); } // Using a DependencyProperty as the backing store for Wrapper. This enables animation, styling, binding, etc... public static readonly DependencyProperty WrapperProperty = DependencyProperty.RegisterAttached("Wrapper", typeof(AttributeInserterExtension), typeof(AttributeInserter), new UIPropertyMetadata(pcc)); static void pcc(DependencyObject o,DependencyPropertyChangedEventArgs e) { var n=e.NewValue as AttributeInserterExtension; var c = o as FrameworkElement; if (n == null || c==null || n.Property==null || n.Binding==null) return; var bex = c.SetBinding(n.Property, n.Binding); bex.UpdateTarget(); if (bex.Status == BindingStatus.UpdateTargetError) c.ClearValue(n.Property); } } public class AttributeInserterExtension : MarkupExtension { public override object ProvideValue(IServiceProvider serviceProvider) { return this; } public DependencyProperty Property { get; set; } public Binding Binding { get; set; } } which kinda works, but can't track changes of the property Any ideas? Any links? thx for the help

    Read the article

  • Setting custom UITableViewCells height

    - by Vijayeta
    I am using a custum UITableViewCell , which has some labels , buttons imageviews to be displayed.There is one label in the cell whose text is a NSString object and the length of string could be variable , due to this i cannot set a constant height to the cell in UITableViews : heightForCellAtIndex method.The ceels height depends on the labels height , whcich can be determined using the NSStrings sizeWithFont method . i tried using it , but looks like i m going wrong somewhere . Can anyone help me out in this , adding the code used in iniatilizing the cell if (self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) { self.selectionStyle = UITableViewCellSelectionStyleNone; UIImage *image = [UIImage imageNamed:@"dot.png"]; imageView = [[UIImageView alloc] initWithImage:image]; imageView.frame = CGRectMake(45.0,10.0,10,10); headingTxt = [[UILabel alloc] initWithFrame: CGRectMake(60.0,0.0,150.0,post_hdg_ht)]; [headingTxt setContentMode: UIViewContentModeCenter]; headingTxt.text = postData.user_f_name; headingTxt.font = [UIFont boldSystemFontOfSize:13]; headingTxt.textAlignment = UITextAlignmentLeft; headingTxt.textColor = [UIColor blackColor]; dateTxt = [[UILabel alloc] initWithFrame:CGRectMake(55.0,23.0,150.0,post_date_ht)]; dateTxt.text = postData.created_dtm; dateTxt.font = [UIFont italicSystemFontOfSize:11]; dateTxt.textAlignment = UITextAlignmentLeft; dateTxt.textColor = [UIColor grayColor]; NSString * text1 = postData.post_body; NSLog(@"text length = %d",[text1 length]); CGRect bounds = [UIScreen mainScreen].bounds; CGFloat tableViewWidth; CGFloat width = 0; tableViewWidth = bounds.size.width/2; width = tableViewWidth - 40; //fudge factor //CGSize textSize = {width, 20000.0f}; //width and height of text area CGSize textSize = {245.0, 20000.0f}; //width and height of text area CGSize size1 = [text1 sizeWithFont:[UIFont systemFontOfSize:11.0f] constrainedToSize:textSize lineBreakMode:UILineBreakModeWordWrap]; CGFloat ht = MAX(size1.height, 28); textView = [[UILabel alloc] initWithFrame:CGRectMake(55.0,42.0,245.0,ht)]; textView.text = postData.post_body; textView.font = [UIFont systemFontOfSize:11]; textView.textAlignment = UITextAlignmentLeft; textView.textColor = [UIColor blackColor]; textView.lineBreakMode = UILineBreakModeWordWrap; textView.numberOfLines = 3; textView.autoresizesSubviews = YES; [self.contentView addSubview:imageView]; [self.contentView addSubview:textView]; [self.contentView addSubview:webView]; [self.contentView addSubview:dateTxt]; [self.contentView addSubview:headingTxt]; [self.contentView sizeToFit]; [imageView release]; [textView release]; [webView release]; [dateTxt release]; [headingTxt release]; } textView = [[UILabel alloc] initWithFrame:CGRectMake(55.0,42.0,245.0,ht)]; this is the label whose height and widh are going wrong

    Read the article

  • How to redirect to a page using a button tag in html?

    - by Vlad Radulescu
    When I Click a button I want to get redirected to a page. The problem is...if I use the normal sintax , the button works fine, but If I apply some css to id by ussing # and .(classes) ,the button it`s not working any more ?! How can I keep my css and functionality at the same time ?! This is my code: <body> <input id="buttonrain" class="classname" type="button" onClick="window.location.href='rain.html'" value="Rain" /> <!--or <a href="rain.html" id="buttonrain" class="classname">Rain</a> still not working--> </body> CSS FILE html { min-width: 100%; min-height: 100%; } body{ width: 1024px; height:600px; background:white; margin:0px; padding:0px 0px; display:block; overflow:hidden; } .classname { -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; box-shadow:inset 0px 1px 0px 0px #ffffff; background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #f0ea3c), color-stop(1, #dfdfdf) ); background:-moz-linear-gradient( center top, #f0ea3c 5%, #dfdfdf 100% ); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f0ea3c', endColorstr='#dfdfdf'); background-color:#f0ea3c; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; border:1px solid #dcdcdc; display:inline-block; color:#0f000f; font-family:Verdana; font-size:15px; font-weight:bold; padding:18px 9px; text-decoration:none; text-shadow:1px 1px 0px #ffffff; position:relative; bottom:250px; }.classname:active { position:relative; top:1px; } #buttonrain{ left:80px; }

    Read the article

  • Multiple labels in Navigation bar

    - by cmos
    I would like to create a view similar to the "Now Playing" page on the iPhone and have 3 lines of text in the Navigation bar. The only way I could find to do this was: UINavigationBar *bar = [self.navigationController navigationBar]; label = [[UILabel alloc] initWithFrame:CGRectMake(60, 2, 200, 14)]; label.tag = SONG_TAG; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont boldSystemFontOfSize:14]; label.adjustsFontSizeToFitWidth = NO; label.textAlignment = UITextAlignmentCenter; label.textColor = [UIColor whiteColor]; label.highlightedTextColor = [UIColor blackColor]; [bar addSubview:label]; [label release]; //Create album label label = [[UILabel alloc] initWithFrame:CGRectMake(60, 17, 200, 12)]; label.tag = ALBUM_TAG; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont systemFontOfSize:12]; label.adjustsFontSizeToFitWidth = NO; label.textAlignment = UITextAlignmentCenter; label.highlightedTextColor = [UIColor blackColor]; label.textColor = HEXCOLOR(0xA5A5A5ff); [bar addSubview:label]; [label release]; //Create artist label label = [[UILabel alloc] initWithFrame:CGRectMake(60, 30, 200, 12)]; label.tag = ARTIST_TAG; label.backgroundColor = [UIColor clearColor]; label.font = [UIFont systemFontOfSize:12]; label.adjustsFontSizeToFitWidth = NO; label.textAlignment = UITextAlignmentCenter; label.highlightedTextColor = [UIColor blackColor]; label.textColor = HEXCOLOR(0xA5A5A5ff); [bar addSubview:label]; [label release]; The problem with this is I have to remove them when the view changes. So, in -viewWillDisappear I have: UILabel *label; label = (UILabel *)[self.navigationController.navigationBar viewWithTag:SONG_TAG]; [label removeFromSuperview]; label = (UILabel *)[self.navigationController.navigationBar viewWithTag:ALBUM_TAG]; [label removeFromSuperview]; label = (UILabel *)[self.navigationController.navigationBar viewWithTag:ARTIST_TAG]; [label removeFromSuperview]; I think the way to do this is make a custom view that has the 3 labels in it, and add this to the title view. (here's the catch - you can only add 1 label or view to the title view spot on the nav bar) self.navigationItem.titleView = newViewIMadeWithThreeLabels

    Read the article

  • scaleX scaleY increeasing left, top margin, and line spacing

    - by Mark
    If you have Text with a font that is 72 point for example (and scaleX scaleY = 1) you can achieve the same size with a font size of 12 and scaleX,scaleY = 6. For reasons that would take too long to explain I am applying a large scale factor as in the latter example. The problem is, even though the text is the same size, the line spacing and left and top margins have all been increased but I want them to be the same size as well. As far as the line spacing, I discovered that TextFormat.leading was being automatically increased when scaleX, scaleY was greater than 1, so I just had to reset TextFormat.leading back to 0. That leaves the left and top margins, and I have no idea how those are being increased. I tried TextFormat.blockIndent=0 and TextFormat.leftMargin=0 (and also ingnorePadding=true) and it had no effect. And have no clue how to reset the top margin either to its orginal size, in case anyone has an idea for all these.

    Read the article

  • Calculating the pixel size of a string with Python

    - by Aristide
    I have a Python script which needs to calculate the exact size of arbitrary strings displayed in arbitrary fonts in order to generate simple diagrams. I can easily do it with Tkinter. The problem is the results seem to depend on the version of Python and/or the system. import Tkinter as tk import tkFont root = tk.Tk() times12 = tkFont.Font(family="times",size=12) print times12.metrics("linespace"), print times12.measure("Hello world") times24 = tkFont.Font(family="times",size=24) print times24.metrics("linespace"), print times24.measure("Hello world") Python 2.5 on Mac OS X gives the actual pixel measurements: 12 57 24 116 Python 2.6.1 on Mac OS X gives: 14 58 27 115 Python 2.6.3 on Windows XP gives: 19 71 36 154 Such a need being quite common, I suspect I did something wrong. Any idea?

    Read the article

  • How to load the rest of the data in mysql in php

    - by user225269
    I have trouble figuring out how do I load the rest of the data in html. Here is my code: <?php $con = mysql_connect("localhost","root","nitoryolai123$%^"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("school", $con); $result = mysql_query("SELECT * FROM student WHERE IDNO='$_GET['id']'"); ?> <?php while ( $row = mysql_fetch_array($result) ) { ?> <table class="a" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#D3D3D3"> <tr> <form name="formcheck" method="post" action="updateact.php" onsubmit="return formCheck(this);"> <td> <table border="0" cellpadding="3" cellspacing="1" bgcolor=""> <tr> <td colspan="16" height="25" style="background:#5C915C; color:white; border:white 1px solid; text-align: left"><strong><font size="2">Update Students</td> <tr> <td width="30" height="35"><font size="2">*I D Number:</td> <td width="30"><input name="idnum" onkeypress="return isNumberKey(event)" type="text" maxlength="5" id='numbers'/ value="<?php echo $_GET['id']; ?>"></td> </tr> <tr> <td width="30" height="35"><font size="2">*Year:</td> <td width="30"><input name="yr" onkeypress="return isNumberKey(event)" type="text" maxlength="5" id='numbers'/ value="<?php echo $row["YEAR"]; ?>"></td> this is the part where I am getting the error: mysql_select_db("school", $con); $result = mysql_query("SELECT * FROM student WHERE IDNO='$_GET['id']'"); ? What do you recommend that I could do so that I can also load the ID Numbers corresponding data into the other forms?

    Read the article

  • top rounded corners in my jquery

    - by Sohail
    Hello everybody, I have this jquery for my menu buttons, what I want is to get top-corner rounded for my menu, this is a whole code: <html> <style type="text/css"> #menuBarHolder { width: 860px; height:45px; background-color:#000; color:#fff; font-family:Arial; font-size:14px; margin-top:20px;} #menuBarHolder ul{ list-style-type:none; display:block;} .firstchild { border-left:1px solid #ccc;} #container { margin-top:10px;} #menuBar li{ float:left; padding:15px; height:16px; width:70px; border-right:1px solid #ccc; } #menuBar li a{color:#fff; text-decoration:none; letter-spacing:-1px; font-weight:bold;} .menuHover { background-color:#999;} .menuInfo { cursor:hand; background-color:#000; color:#fff; width:74px; font-size:11px;height:100px; padding:3px; display:none; position:absolute; margin-left:-15px; margin-top:0px; -moz-border-radius-bottomright: 5px; -moz-border-radius-bottomleft: 5px; -webkit-border-bottom-left-radius: 5px; -webkit-border-bottom-right-radius: 5px; -khtml-border-radius-bottomright: 5px; -khtml-border-radius-bottomleft: 5px; border-radius-bottomright: 5px;border-radius-bottomleft: 5px; } </style> <!--[if IE]> <style type="text/css"> #menuBar li a{width:50px;} .menuInfo { margin-left:-65px; width:80px;} </style> <![endif]--> <script src="http://jqueryjs.googlecode.com/files/jquery-1.2.6.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#menuBar li').click(function() { var url = $(this).find('a').attr('href'); document.location.href = url; }); $('#menuBar li').hover(function() { $(this).find('.menuInfo').slideDown(); }, function() { $(this).find('.menuInfo').slideUp(); }); }); </script> <center> <div id="menuBarHolder"> <ul id="menuBar"> <li class="firstchild"><a href="javascript:#">Home</a><div class="menuInfo">I am some text about the home section</div></li> <li><a href="javascript:#">About Us</a><div class="menuInfo">I am some text about the services section</div></li> <li><a href="javascript:#">News</a><div class="menuInfo">I am some text about the clients section</div></li> <li><a href="javascript:#">Equipment</a><div class="menuInfo">I am some text about the portfolio section</div></li> <li><a href="javascript:#">Services</a><div class="menuInfo">I am some text about the about section</div></li> <li><a href="javascript:#">Project</a><div class="menuInfo">I am some text about the blog section</div></li> <li><a href="javascript:#">Contact Us</a><div class="menuInfo">I am some text about the follow section</div></li> </ul> </div> </div> </center> </html> Thanks for your help.

    Read the article

  • How to set Foreground Color in a ListBox single element?

    - by user1038056
    I'm doing a game. I have a list of users (nicks): List<string> users; This list is used to show to the users on a ListBox, call listaJogadores. public delegate void actualizaPlayersCallback(List<string> users); public void actualizaPlayers(List<string> users) { listaJogadores.BeginInvoke(new actualizaPlayersCallback(this.actualizarListaPlayers), new object[] { users }); } public void actualizarListaPlayers(List<string> users) { listaJogadores.Items.Clear(); for (int i = 0; i < users.Count; i++) { listaJogadores.Items.Add(users.ElementAt(i)); } } When a user is playing, then it have is nick on the list of games: List<Game> games; What I want is when a player enter in a game, the color of is nick show in listaJogadores, must be Red! When I have only one player in a game, everything is ok, all the players see the nick of that player in red, but when another player go to a game, then I get an ArgumentOutOfRangeException in the instruction string nick = tmp.players.ElementAt(i).getNick(); This is my code... Give me some ideas/help please! I think that the problem is the for(), but how can I manipulate an entire list without doing a loop? listaJogadores.DrawMode = DrawMode.OwnerDrawFixed; private void listaJogadores_DrawItem(object sender, DrawItemEventArgs e) { e.DrawBackground(); Brush textBrush = SystemBrushes.ControlText; Font drawFont = e.Font; for (int i = 0; i < games.Count; i++) { Game tmp; tmp = games.ElementAt(i); for (int j = 0; j < tmp.players.Count; j++) { string nick = tmp.players.ElementAt(i).getNick(); if (listaJogadores.Items[e.Index].ToString() == nick) { textBrush = Brushes.Red;//RED.... if ((e.State & DrawItemState.Selected) > 0) drawFont = new Font(drawFont.FontFamily, drawFont.Size, FontStyle.Bold); } else if ((e.State & DrawItemState.Selected) > 0) { textBrush = SystemBrushes.HighlightText; } } } e.Graphics.DrawString(listaJogadores.Items[e.Index].ToString(), drawFont, textBrush, e.Bounds); }

    Read the article

  • How to bind grid in ASP.NET?

    - by Abid Ali
    I cant bind my Grid. I dont know what I am doing wrong, the grid appears empty when I run the program. here is my code :: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) this.BindGrid(this.GridView1); } private void BindGrid(GridView grid) { SqlCommand cmd = new SqlCommand("Select * from Person", cn); SqlDataAdapter da = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); da.Fill(dt); grid.DataSource = dt; grid.DataBind(); } <body> <form id="form1" runat="server"> <div style="margin-left: 240px"> <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" Width="856px" AutoGenerateColumns = "false" ShowFooter = "true" ShowHeader="true" BorderStyle="Groove" CaptionAlign="Top" HorizontalAlign="Center" onrowdatabound="GridView1_RowDataBound" > <RowStyle BackColor="#F7F6F3" ForeColor="#333333" /> <Columns> <asp:BoundField HeaderText="ID" /> <asp:BoundField HeaderText="First Name" /> <asp:BoundField HeaderText="Last Name" /> <asp:BoundField HeaderText="Home Phone #" /> <asp:BoundField HeaderText="Cell #" /> <asp:BoundField HeaderText="Email Address" /> <asp:BoundField HeaderText="NIC #" /> <asp:TemplateField HeaderText="Action"> <ItemTemplate> <asp:Button ID="Button1" runat="server" Text="Button" /> <asp:Button ID="Button2" runat="server" Text="Button" /> </ItemTemplate> </asp:TemplateField> </Columns> <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" /> <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" /> <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" /> <EditRowStyle BackColor="#999999" /> <AlternatingRowStyle BackColor="White" ForeColor="#284775" /> </asp:GridView> </div> </form> </body>

    Read the article

  • CSS Collapsing/Hiding divs with no data in <span>

    - by Chance
    I am trying to display an address which includes the following information: Title, division, address1, address2, town/state/zip, and country (5 seperate lines worth of data). The problem is sometimes the company may only have the title, address1, and town/state/zip yet other times it may be all but address2. This is determined upon a db record request server side. Therefore how can I make my output look proper when some of my labels will be blank? I would like div's that contain an empty span to be essentially collapsed/removed. My only idea of how was to use jquery and a selector to find all divs with blank spans (since thats all an asp.net label really is) and then remove those divs however this seems like such bad form. Is there any way to do this with css? Possible Code would be something like: $('span:empty:only-child').parent('div').remove(); Picture Examples (Ignore spacing/indentation issues which I will fix) Missing Division, Address2, and Country All Possible Fields The Html <asp:Label runat="server" ID="lblBillingAddressHeader" CssClass="lblBillingAddressHeader" Text="Billing Address:" /> <div style="position:relative; top:150px; left: 113px;"> <div class="test"> <asp:Label runat="server" ID="lblBillingDivision" CssClass="lblBillingShippingDivisionFont" /> </div> <div class="test"> <asp:Label runat="server" ID="lblBillingAddress" CssClass="lblBillingShippingFont" /> </div> <div class="test"> <asp:Label runat="server" ID="lblBillingAddress2" CssClass="lblBillingShippingFont" /> </div> <div class="test"> <asp:Label runat="server" ID="lblBillingAddress3" CssClass="lblBillingShippingFont" /> </div> <div class="test"> <asp:Label runat="server" ID="lblBillingAddress4" CssClass="lblBillingShippingFont" /> </div> </div> The CSS .test { position: relative; top: 0px; left: 0px; height: 12px; width: 300px; } .lblBillingShippingDivisionFont { font-size: small; font-weight: bold; } .lblBillingShippingFont { font-size: 10.6px; }

    Read the article

  • Tag Cloud JS + Flash. Actual Tags In Cloud Not Clickable?

    - by Alex
    Hello all, I've implemented a tag cloud on a site of mine, and I'm using a JS script to populate it, but for some reason, the actual text in the tag cloud is not clickable. It displays and works correctly, but the actual text of the cloud is not getting treated as a link for some odd reason. My question is: In my script below, do you see anything that I need to fix in order to make my tag cloud's text actually be links? The site I've implemented it on is a stackexhange site that I run, it is supposed to be a cloud of the "recent tags." CloudPopulator.js <script type="text/javascript"> var divRecentTags = document.getElementById("recent-tags"); if (divRecentTags) { var cloud = new SWFObject("some/swfObject/url", "tagcloudflash", "200", "200", "9", "#ffffff"); cloud.addParam("allowScriptAccess", "always"); cloud.addVariable("tcolor", "0x0a94d6"); cloud.addVariable("tcolor2", "0xC0C0C0"); cloud.addVariable("hicolor", "0x000000"); cloud.addVariable("tspeed", "150"); cloud.addVariable("distr", "true"); cloud.addVariable("mode", "tags"); var aTags = divRecentTags.getElementsByTagName("a"); var tagHtml = ""; for(var i = 0; i < aTags.length; i++) { var hrefText = aTags[i].getAttribute("href"); var cssText = aTags[i].className; var tagName = $(aTags[i]).text(); var styleText = "style=\'font-size: 8pt;\'"; if (cssText == "post-tag pop1") { var styleText = "style=\'font-size: 15pt;\'"; } else if (cssText == "post-tag pop2") { var styleText = "style=\'font-size: 22pt;\'"; } var newLinkText = "<a href=\'"+hrefText+"\'"+styleText+">"+tagName+"</a>"; tagHtml = tagHtml + newLinkText; } cloud.addVariable("tagcloud", escape("<tags>" + tagHtml + "</tags>")); cloud.write("recent-tags"); } </script>

    Read the article

  • Java Swing: JWindow appears behind all other process windows, and will not disappear

    - by Kim Jong Woo
    I am using JWindow to display my splash screen during the application start up. however it will not appear in front of all windows as it should, and it will not disappear as well. import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.Font; import java.awt.Toolkit; import javax.swing.BorderFactory; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JWindow; public class MySplash { public static MySplash INSTANCE; private static JWindow jw; public MySplash(){ createSplash(); } private void createSplash() { jw = new JWindow(); JPanel content = (JPanel) jw.getContentPane(); content.setBackground(Color.white); // Set the window's bounds, centering the window int width = 328; int height = 131; Dimension screen = Toolkit.getDefaultToolkit().getScreenSize(); int x = (screen.width - width) / 2; int y = (screen.height - height) / 2; jw.setBounds(x, y, width, height); // Build the splash screen JLabel label = new JLabel(new ImageIcon("splash.jpg")); JLabel copyrt = new JLabel("SplashScreen Test", JLabel.CENTER); copyrt.setFont(new Font("Sans-Serif", Font.BOLD, 12)); content.add(label, BorderLayout.CENTER); content.add(copyrt, BorderLayout.SOUTH); Color oraRed = new Color(156, 20, 20, 255); content.setBorder(BorderFactory.createLineBorder(oraRed, 0)); } public synchronized static MySplash getInstance(){ if(INSTANCE==null){ INSTANCE = new MySplash(); } return INSTANCE; } public void showSplash(){ jw.setAlwaysOnTop(true); jw.toFront(); jw.setVisible(true); return; } public void hideSplash(){ jw.setAlwaysOnTop(false); jw.toBack(); jw.setVisible(false); return; } } So in my main class which extends JFrame, I call my splash screen by SwingUtilities.invokeLater(new Runnable(){ @Override public void run() { MySplash.getInstance().showSplash(); } }); However, the JWindow appears behind the all open instances of windows on my computer. Hiding the JWindow also doesn't work. SwingUtilities.invokeLater(new Runnable(){ @Override public void run() { MySplash.getInstance().hideSplash(); } });

    Read the article

  • How can I get PHP to compile a LaTeX document if it (www-data) can't get access to the required packages?

    - by Mark Jones
    I have a PHP script that compiles LaTeX documents with the use of: exec('cd /path/to/doc && /usr/bin/latexmk -pdf filename.tex'); This is working for some of my LaTeX documents but my latest document doesn't compile and a look at the log reveals: !pdfTeX error: pdflatex (file ecrm1000): Font ecrm1000 at 600 not found ==> Fatal error occurred, no output PDF file produced! Which I have found is the result of LaTeX not being able to see the required font packages. When I run the same compile command under my username the document compiles as it should. So my question is, how can I get PHP (executing as www-data) to get access to the necessary LaTeX packages? I have tried installing the required package under the www-data account using: sudo -u www-data sudo apt-get install texlive-fonts-recommended but it askes for www-data's password, which I don't believe was set by me and isn't anything I've thrown at it. I'm running Ubuntu 12.04 if it's any help.

    Read the article

  • CSS Issue in Firefox/IE

    - by bethhilson
    I'm working on a site's CSS and am running across an issue with the body margin section. If you look at this in Firefox and then IE, you can see the line isn't lined up right in Firefox, but it is in IE. (In the black header section). Here is what I have for the body tag, It's something with the margin and I can't figure it out: body { margin: -2px; padding: 0px; background: #E7E7E7 url(images/bg01.jpg) repeat-x left top; font-family: Arial, Helvetica, sans-serif; font-size: 11px; color: #888888; } Thank you for any responses!

    Read the article

  • Center four columns in CSS

    - by Ernest
    Hi everybody, I'm trying to make four columns that are centered on the frontpage. I would like it to look like this example: http://www.clutterpad.com/ My code looks like this: #bottom-container {width:100%;height:250px;position:relative;} #bottom-mid {background-color:white;} #bottom-left, #bottom-mid, #bottom-right {height:250px;} #bottom-left, #bottom-right {width:50%;float:left;} #bottom-left {background-color:white;position:absolute;top:0px;left:0px;} #bottom-right {background-color:white;position:absolute;top:0px;left:50%;} #bottom-mid {position:relative;margin:0px auto; width:1000px;z-index:2;} #column-container {width:100%; margin:20px auto;} .column {width:200px;float:left;font-size:10pt;font-family:Arial;margin:20px 10px;} But it's not working out. How should I code it to look like the example I mentioned before?

    Read the article

< Previous Page | 95 96 97 98 99 100 101 102 103 104 105 106  | Next Page >