Search Results

Search found 5011 results on 201 pages for 'label'.

Page 5/201 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Using LINQ, how do you get all label controls.

    - by John
    I want to get a collection of all label controls that are part of a user control. I have the following code: var labelControls = from Control ctl in this.Controls where ctl.GetType() == typeof(Label) select ctl; but the result is zero results. Please assist. Thanks.

    Read the article

  • Workaround iPhone's browser not honoring the <label> element

    - by Sorin Comanescu
    Hi, Just ran into this recently and I thought it'd be helpful to share. The HTML <label> element is supported in a weird way by iPhone's (v3) browser. Try this: <input type="checkbox" id="chkTest" /><label for="chkTest">Click me!</label> Tapping the "Click me!" label has no effect, the checkbox is not checked. Lack of support in a touch device for <label> elements puzzled me and I tried to overcome this issue by using javascript. The surprise came when a I noticed a void javascript like the one below also did the trick: <input type="checkbox" id="chkTest" /><label for="chkTest" onclick="javascript:void(0);">Click me!</label> HTH Further info: Also works with an empty handler: onclick="" Disabling JavaScript inactivates again the label, even if using the empty handler.

    Read the article

  • How to code the label tag for XHTML

    - by oReiLLy
    Label tag coding style. Can I write my label tag like this. <input type="text" name="lname" id="ln" /> <label for="ln">Last Name:</label> Instead of like this. <label for="ln">Last Name:</label> <input type="text" name="lname" id="ln" />

    Read the article

  • Should we use <label> for every <input>?

    - by metal-gear-solid
    Should we use <label> for every input? , even for submit button and keep hidden thorough css if we don't want to show label. or no need of label for submit button? .hide {display:none} <fieldset> <legend>Search</legend> <label for="Search">Search...</label> <input value="" id="Search" name="Search"> <label for="Submit" class="hide">Submit</label> <input type="submit" value="Go!" name="submit" id="submit"> </fieldset> or we should use like this (no label for submit) <fieldset> <legend>Search</legend> <label for="Search">Search...</label> <input value="" id="Search" name="Search"> <input type="submit" value="Go!" name="submit" > </fieldset>

    Read the article

  • Reading label Id

    - by user281180
    Im having a table in which im creating a label dynamically. '<td>' + '<label for="Name" id = ' + value + '>' + text + '</label></td>' I want to retrieve the id of the label and I`m doing the following which is not working: How can I get the Id of the label? function ReadNames() { $('#Table tr').each(function() { NameID.push($(this).find('label').val()); }); }

    Read the article

  • What label of tests are BizUnit tests?

    - by charlie.mott
    BizUnit is defined as a "Framework for Automated Testing of Distributed Systems.  However, I've never seen a catchy label to describe what sort of tests we create using this framework. They are not really “Unit Tests” that's for sure. "Integration Tests" might be a good definition, but I want a label that clearly separates it from the manual "System Integration Testing" phase of a project where real instances of the integrated systems are used. Among some colleagues, we brainstormed some suggestions: Automated Integration Tests Stubbed Integration Tests Sandbox Integration Tests Localised Integration Tests All give a good view of the sorts of tests that are being done. I think "Stubbed Integration Tests" is most catchy and descriptive. So I will use that until someone comes up with a better idea.

    Read the article

  • DELETE and EDIT is not working in my python program

    - by user2968025
    This is a simple python program that ADD, DELETE, EDIT and VIEW student records. The problem is, DELETE and EDIT is not working. I dont know why but when I tried removing one '?' in the DELETE dunction, I had the error that says there are only 8 columns and it needs 10. But originally, there are only 9 columns. I don't know where it got the other one to make it 10. Please help.. :( import sys import sqlite3 import tkinter import tkinter as tk from tkinter import * from tkinter.ttk import * def newRecord(): studentnum="" name="" age="" birthday="" address="" email="" course="" year="" section="" con=sqlite3.connect("Students.db") cur=con.cursor() cur.execute("CREATE TABLE IF NOT EXISTS student(studentnum TEXT, name TEXT, age TEXT, birthday TEXT, address TEXT, email TEXT, course TEXT, year TEXT, section TEXT)") def save(): studentnum=en1.get() name=en2.get() age=en3.get() birthday=en4.get() address=en5.get() email=en6.get() course=en7.get() year=en8.get() section=en9.get() student=(studentnum,name,age,birthday,address,email,course,year,section) cur.execute("INSERT INTO student(studentnum,name,age,birthday,address,email,course,year,section) VALUES(?,?,?,?,?,?,?,?,?)",student) con.commit() win=tkinter.Tk();win.title("Students") lbl=tkinter.Label(win,background="#000",foreground="#ddd",width=30,text="Add Record") lbl.pack() lbl1=tkinter.Label(win,width=30,text="Student Number : ") lbl1.pack() en1=tkinter.Entry(win,width=30) en1.pack() lbl2=tkinter.Label(win,width=30,text="Name : ") lbl2.pack() en2=tkinter.Entry(win,width=30) en2.pack() lbl3=tkinter.Label(win,width=30,text="Age : ") lbl3.pack() en3=tkinter.Entry(win,width=30) en3.pack() lbl4=tkinter.Label(win,width=30,text="Birthday : ") lbl4.pack() en4=tkinter.Entry(win,width=30) en4.pack() lbl5=tkinter.Label(win,width=30,text="Address : ") lbl5.pack() en5=tkinter.Entry(win,width=30) en5.pack() lbl6=tkinter.Label(win,width=30,text="Email : ") lbl6.pack() en6=tkinter.Entry(win,width=30) en6.pack() lbl7=tkinter.Label(win,width=30,text="Course : ") lbl7.pack() en7=tkinter.Entry(win,width=30) en7.pack() lbl8=tkinter.Label(win,width=30,text="Year : ") lbl8.pack() en8=tkinter.Entry(win,width=30) en8.pack() lbl9=tkinter.Label(win,width=30,text="Section : ") lbl9.pack() en9=tkinter.Entry(win,width=30) en9.pack() btn1=tkinter.Button(win,background="#000",foreground="#ddd",width=30,text="Save Student",command=save) btn1.pack() def editRecord(): studentnum1="" def edit(): studentnum1=en10.get() studentnum="" name="" age="" birthday="" address="" email="" course="" year="" section="" con=sqlite3.connect("Students.db") cur=con.cursor() row=cur.fetchone() cur.execute("DELETE FROM student WHERE name = '%s'" % studentnum1) con.commit() def save(): studentnum=en1.get() name=en2.get() age=en3.get() birthday=en4.get() address=en5.get() email=en6.get() course=en7.get() year=en8.get() section=en8.get() student=(studentnum,name,age,email,birthday,address,email,course,year,section) cur.execute("INSERT INTO student(studentnum,name,age,email,birthday,address,email,course,year,section) VALUES(?,?,?,?,?,?,?,?,?)",student) con.commit() win=tkinter.Tk();win.title("Students") lbl=tkinter.Label(win,background="#000",foreground="#ddd",width=30,text="Edit Reocrd :"+'\t'+studentnum1) lbl.pack() lbl1=tkinter.Label(win,width=30,text="Student Number : ") lbl1.pack() en1=tkinter.Entry(win,width=30) en1.pack() lbl2=tkinter.Label(win,width=30,text="Name : ") lbl2.pack() en2=tkinter.Entry(win,width=30) en2.pack() lbl3=tkinter.Label(win,width=30,text="Age : ") lbl3.pack() en3=tkinter.Entry(win,width=30) en3.pack() lbl4=tkinter.Label(win,width=30,text="Birthday : ") lbl4.pack() en4=tkinter.Entry(win,width=30) en4.pack() lbl5=tkinter.Label(win,width=30,text="Address : ") lbl5.pack() en5=tkinter.Entry(win,width=30) en5.pack() lbl6=tkinter.Label(win,width=30,text="Email : ") lbl6.pack() en6=tkinter.Entry(win,width=30) en6.pack() lbl7=tkinter.Label(win,width=30,text="Course : ") lbl7.pack() en7=tkinter.Entry(win,width=30) en7.pack() lbl8=tkinter.Label(win,width=30,text="Year : ") lbl8.pack() en8=tkinter.Entry(win,width=30) en8.pack() lbl9=tkinter.Label(win,width=30,text="Section : ") lbl9.pack() en9=tkinter.Entry(win,width=30) en9.pack() btn1=tkinter.Button(win,background="#000",foreground="#ddd",width=30,text="Save Record",command=save) btn1.pack() win=tkinter.Tk();win.title("Edit Student") lbl=tkinter.Label(win,background="#000",foreground="#ddd",width=30,text="Edit Record") lbl.pack() lbl10=tkinter.Label(win,width=30,text="Student Number : ") lbl10.pack() en10=tkinter.Entry(win) en10.pack() btn2=tkinter.Button(win,background="#000",foreground="#ddd",width=30,text="Edit",command=edit) btn2.pack() def deleteRecord(): studentnum1="" win=tkinter.Tk();win.title("Delete Student Record") lbl=tkinter.Label(win,background="#000",foreground="#ddd",width=30,text="Delete Record") lbl.pack() lbl10=tkinter.Label(win,text="Student Number") lbl10.pack() en10=tkinter.Entry(win) en10.pack() def delete(): studentnum1=en10.get() con=sqlite3.connect("Students.db") cur=con.cursor() row=cur.fetchone() cur.execute("DELETE FROM student WHERE name = '%s';" % studentnum1) con.commit() win=tkinter.Tk();win.title("Record Deleted") lbl=tkinter.Label(win,background="#000",foreground="#ddd",width=30,text="Record Deleted :") lbl.pack() lbl=tkinter.Label(win,width=30,text=studentnum1) lbl.pack() btn=tkinter.Button(win,background="#000",foreground="#ddd",width=30,text="Ok",command=win.destroy) btn.pack() btn2=tkinter.Button(win,background="#000",foreground="#ddd",width=30,text="Delete",command=delete) btn2.pack() def viewRecord(): con=sqlite3.connect("Students.db") cur=con.cursor() win=tkinter.Tk();win.title("View Student Record"); row=cur.fetchall() lbl1=tkinter.Label(win,background="#000",foreground="#ddd",width=300,text="\n\tStudent Number"+"\t\tName"+"\t\tAge"+"\t\tBirthday"+"\t\tAddress"+"\t\tEmail"+"\t\tCourse"+"\t\tYear"+"\t\nSection") lbl1.pack() for row in cur.execute("SELECT * FROM student"): lbl2=tkinter.Label(win,width=300,text= row[0] + '\t\t' + row[1] + '\t' + row[2] + '\t\t' + row[3] + '\t\t' + row[4] + '\t\t' + row[5] + '\t\t' + row[6] + '\t\t' + row[7] + '\t\t' + row[8] + '\n') lbl2.pack() con.close() but1=tkinter.Button(win,background="#000",foreground="#fff", width=150,text="Close",command=win.destroy) but1.pack() root=tkinter.Tk();root.title("Student Records") menubar=tkinter.Menu(root) manage=tkinter.Menu(menubar,tearoff=0) manage.add_command(label='New Record',command=newRecord) manage.add_command(label='Edit Record',command=editRecord) manage.add_command(label='Delete Record',command=deleteRecord) menubar.add_cascade(label='Manage',menu=manage) view=tkinter.Menu(menubar,tearoff=0) view.add_command(label='View Record',command=viewRecord) menubar.add_cascade(label='View',menu=view) root.config(menu=menubar) lbl=tkinter.Label(root,background="#000",foreground="#ddd",font=("Verdana",15),width=30,text="Student Records") lbl.pack() lbl1=tkinter.Label(root,text="\nSubmitted by :") lbl1.pack() lbl2=tkinter.Label(root,text="Chavez, Vissia Nicole P") lbl2.pack() lbl3=tkinter.Label(root,text="BSIT 4-4") lbl3.pack()

    Read the article

  • Tkinter, Python: How do I save text entered in the Entry widget? How do I move a label?

    - by user3692825
    I am a newbie at programming and my program is not stellar but hopefully it's ok because I have only been using it for a couple days now. I am having trouble in my class "Recipie". In this class I am having trouble saving the text in my Entry widget. I know to use the .get() option but when I try to print it, it doesn't (whether it is within that defined method or not). So that is my main concern. I want it to save the text entered as a string when I press the button: b. My other minor question is, how can I move the label. When I have tried I have used the height and width options, but that just expands the label. I want to move the text to create a title above my Entry boxes. Is label the right widget to use or would it be easier to use a message box widget? So it would look like, for example (but like 8 pixels down and 20 to the right): ingredients textbox button labeled as: add an ingredient And I am not sure the option .pack(side="...") or .place(anchor="...") are the right options to use for my buttons or entry boxes or labels. Any help is greatly appreciated!!! And if you could add comments to your code explaining what you did, that would be so helpful. Thank you!!! import Tkinter class Recipie(Tkinter.Tk): def __init__(self): Tkinter.Tk.__init__(self) self.title("New Recipie") self.geometry("500x500") def name(self): name = Tkinter.Label(self, text="Title:", width=39) name.place(anchor="nw") insert_name = Tkinter.Entry(self) insert_name.pack() insert_name.focus_set() def ingredients(self): e = Tkinter.Entry(self) e.pack() e.focus_set() def addingredient(self): but = Tkinter.Button(self, text="Add Ingredients", width=15, command=self.ingredients) but.pack(side="bottom") def procedure(self): txt = Tkinter.Label(self, text="List the Steps:") txt.place(anchor="n") p = Tkinter.Entry(self) p.place(anchor="nw") p.focus_set() def savebutton(self): print insert_name.get() print e.get() print p.get() b = Tkinter.Button(self, text="Save Recipie", width=15, command=savebutton) top = Recipie() top.mainloop()

    Read the article

  • Is it possible to use an input within a <label> field?

    - by javanix
    I have a bunch of optional "write-in" values for a survey I'm working on. These are basically a radio button with a textbox within the answer field - the idea being that you would toggle the button and write something into the box. What I'd like to do is have the radio button toggled whenever a user clicks in the text field - this seems like a use-case that makes a lot of sense. Doing this: <input type="radio" id="radiobutton"><label for="radiobutton">Other: <input type="text" id="radiobutton_other"></label> works fine in Chrome (and I am guessing, other WebKit browsers as well), but there are weird selection issues in Firefox, so I'm assuming its a non-standard practice that I should stay away from. Is there a way to replicate this functionality without using JavaScript? I have an onclick function that will work, but we're trying to make our site usable for people who might have NoScript-type stuff running.

    Read the article

  • ASP.NET MVC–How to show asterisk after required field label

    - by DigiMortal
    Usually we have some required fields on our forms and it would be nice if ASP.NET MVC views can detect those fields automatically and display nice red asterisk after field label. As this functionality is not built in I built my own solution based on data annotations. In this posting I will show you how to show red asterisk after label of required fields. Here are the main information sources I used when working out my own solution: How can I modify LabelFor to display an asterisk on required fields? (stackoverflow) ASP.NET MVC – Display visual hints for the required fields in your model (Radu Enuca) Although my code was first written for completely different situation I needed it later and I modified it to work with models that use data annotations. If data member of model has Required attribute set then asterisk is rendered after field. If Required attribute is missing then there will be no asterisk. Here’s my code. You can take just LabelForRequired() methods and paste them to your own HTML extension class. public static class HtmlExtensions {     [SuppressMessage("Microsoft.Design", "CA1006:DoNotNestGenericTypesInMemberSignatures", Justification = "This is an appropriate nesting of generic types")]     public static MvcHtmlString LabelForRequired<TModel, TValue>(this HtmlHelper<TModel> html, Expression<Func<TModel, TValue>> expression, string labelText = "")     {         return LabelHelper(html,             ModelMetadata.FromLambdaExpression(expression, html.ViewData),             ExpressionHelper.GetExpressionText(expression), labelText);     }       private static MvcHtmlString LabelHelper(HtmlHelper html,         ModelMetadata metadata, string htmlFieldName, string labelText)     {         if (string.IsNullOrEmpty(labelText))         {             labelText = metadata.DisplayName ?? metadata.PropertyName ?? htmlFieldName.Split('.').Last();         }           if (string.IsNullOrEmpty(labelText))         {             return MvcHtmlString.Empty;         }           bool isRequired = false;           if (metadata.ContainerType != null)         {             isRequired = metadata.ContainerType.GetProperty(metadata.PropertyName)                             .GetCustomAttributes(typeof(RequiredAttribute), false)                             .Length == 1;         }           TagBuilder tag = new TagBuilder("label");         tag.Attributes.Add(             "for",             TagBuilder.CreateSanitizedId(                 html.ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName(htmlFieldName)             )         );           if (isRequired)             tag.Attributes.Add("class", "label-required");           tag.SetInnerText(labelText);           var output = tag.ToString(TagRenderMode.Normal);             if (isRequired)         {             var asteriskTag = new TagBuilder("span");             asteriskTag.Attributes.Add("class", "required");             asteriskTag.SetInnerText("*");             output += asteriskTag.ToString(TagRenderMode.Normal);         }         return MvcHtmlString.Create(output);     } } And here’s how to use LabelForRequired extension method in your view: <div class="field">     @Html.LabelForRequired(m => m.Name)     @Html.TextBoxFor(m => m.Name)     @Html.ValidationMessageFor(m => m.Name) </div> After playing with CSS style called .required my example form looks like this: These red asterisks are not part of original view mark-up. LabelForRequired method detected that these properties have Required attribute set and rendered out asterisks after field names. NB! By default asterisks are not red. You have to define CSS class called “required” to modify how asterisk looks like and how it is positioned.

    Read the article

  • Gmail: Find emails that do not have a label

    - by DGHelp
    Hello, I am trying to search for all of my mail that does not have a label. I label all of my mail then archive it but I think throughout the years I have forgotten some. Is there anyway I can search for all mail that does not have a label? Idea I had: Go to my All Mail and apply an arbitrary label to all of them, then go to each of my labels and remove my arbitrary one. However, is there a quick way to add a label to ALL mail for this idea to work? Also, I think this will apply it to even my sent mail instead of just mail that was sent to me? Any ideas/suggestions would be great. Thanks!

    Read the article

  • wxpython - Nested Notebooks

    - by madtowneast
    I have been trying to make my nested notebooks a little bit more appealing code wise. At the moment, I got this #!/usr/bin/env python import os import sys import datetime import numpy as np from readmonifile import MonitorFile from sortmonifile import sort import wx class NestedPanelOne(wx.Panel): #---------------------------------------------------------------------- # First notebook that creates the tab to select the component number #---------------------------------------------------------------------- def __init__(self, parent, label, data): wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY) sizer = wx.BoxSizer(wx.VERTICAL) #Loop creating the tabs according to the component name nestedNotebook = wx.Notebook(self, wx.ID_ANY) for slabel in sorted(data[label].keys()): tab = NestedPanelTwo(nestedNotebook, label, slabel, data) nestedNotebook.AddPage(tab,slabel) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(nestedNotebook, 1, wx.ALL|wx.EXPAND, 5) self.SetSizer(sizer) class NestedPanelTwo(wx.Panel): #------------------------------------------------------------------------------ # Second notebook that creates the tab to select the main monitoring variables #------------------------------------------------------------------------------ def __init__(self, parent, label, slabel, data): wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY) sizer = wx.BoxSizer(wx.VERTICAL) nestedNotebook = wx.Notebook(self, wx.ID_ANY) for sslabel in sorted(data[label][slabel][data[label][slabel].keys()[0]].keys()): tab = NestedPanelThree(nestedNotebook, label, slabel, sslabel, data) nestedNotebook.AddPage(tab, sslabel) sizer.Add(nestedNotebook, 1, wx.ALL|wx.EXPAND, 5) self.SetSizer(sizer) class NestedPanelThree(wx.Panel): #------------------------------------------------------------------------------- # Third notebook that creates checkboxes to select the monitoring sub-variables #------------------------------------------------------------------------------- def __init__(self, parent, label, slabel, sslabel, data): wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY) labels=[] chbox =[] chboxdict={} for ssslabel in sorted(data[label][slabel][data[label][slabel].keys()[0]][sslabel].keys()): labels.append(ssslabel) for item in list(set(labels)): cb = wx.CheckBox(self, -1, item) chbox.append(cb) chboxdict[item]=cb gridSizer = wx.GridSizer(np.shape(list(set(labels)))[0],3, 5, 5) gridSizer.AddMany(chbox) self.SetSizer(gridSizer) ######################################################################## class NestedNotebookDemo(wx.Notebook): #--------------------------------------------------------------------------------- # Main notebook creating tabs for the monitored components #--------------------------------------------------------------------------------- def __init__(self, parent, data): wx.Notebook.__init__(self, parent, id=wx.ID_ANY, style= wx.BK_DEFAULT ) for label in sorted(data.keys()): print label tab = NestedPanelOne(self,label, data) self.AddPage(tab, label) ######################################################################## class DemoFrame(wx.Frame): #---------------------------------------------------------------------- # Putting it all together #---------------------------------------------------------------------- def __init__(self,data): wx.Frame.__init__(self, None, wx.ID_ANY, "pDAQ monitoring plotting tool", size=(800,400) ) panel = wx.Panel(self) notebook = NestedNotebookDemo(panel, data) sizer = wx.BoxSizer(wx.VERTICAL) sizer.Add(notebook, 1, wx.ALL|wx.EXPAND, 5) panel.SetSizer(sizer) self.Layout() #Menu Bar to be added later ''' menubar = wx.MenuBar() file = wx.Menu() file.Append(1, '&Quit', 'Exit Tool') menubar.Append(file, '&File') self.SetMenuBar(menubar) self.Bind(wx.EVT_MENU, self.OnClose, id=1) ''' self.Show() #---------------------------------------------------------------------- if __name__ == "__main__": if len(sys.argv) == 1: raise SystemExit("Please specify a file to process") for f in sys.argv[1:]: data=sort.sorting(f) print data['stringHub'].keys() print data.keys() print data[data.keys()[0]].keys() print 'test' app = wx.PySimpleApp() frame = DemoFrame(data) app.MainLoop() print 'testend' and I would like to reduce this whole mess into something that only has three nested for loops, so something like for label in sorted(data.keys()): self.SubNoteBooks[label] = wx.Notebook(self.Notebook, wx.ID_ANY) self.Notebook.AddPage(self.SubNoteBooks[label], label) for slabel in sorted(data[label].keys()): self.SubNoteBooks[label][slabel] = wx.Notebook(self, wx.ID_ANY) self.SubNoteBooks[label].AddPage(self.SubNoteBooks[label][slabel], slabel) for sslabel in sorted(data[label][slabel][data[label][slabel].keys()[0]].keys()): self.SubNoteBooks[label][slabel][sslabel] = wx.Notebook(self.Notebook, wx.ID_ANY) self.Notebook.AddPage(self.SubNoteBooks[label][slabel][sslabel], sslabel) I have been trying to fiddle this around but the problem seems to be the line self.SubNoteBooks[label][slabel] = wx.Notebook(self, wx.ID_ANY) I get the error: Traceback (most recent call last): File "./reducelinenumbers.py", line 162, in <module> frame = DemoFrame(data) File "./reducelinenumbers.py", line 126, in __init__ self.SubNoteBooks[label][slabel] = wx.Notebook(self, wx.ID_ANY) TypeError: 'Notebook' object does not support item assignment I understand why notebook is being type raises a TypeError here. Is there a way around this? Thanks a bunch in advance.

    Read the article

  • My list item's child label elements disappear in IE on accordion menu opening

    - by Scott B
    I've got an app that's working pretty flawlessly in Chrome and FF, however, when I view it in IE, all is well until I click on a header element to activate it (jQuery accordion). What happens then is that I see a brief flash where the content is there, then suddenly the entire left column disappears. This column is generated by a floated label element with a class of ".left" as seen below... <ul class="menu collapsible"> <li class='expand sectionTitle'><a href='#'>General Settings</a> <ul class='acitem'> <li class="section"> <label class="left">This item if floated left with a defined width of 190px via css. This is the item that's disappearing after a brief display</label> <input class="input" value="input element here" /> <label class="description">This element has a margin-left:212px; set via css in order to be positioned to the right of the label element as if in an adjacent table cell. When I add a max-width property to this element, it disappears in IE too!</label> </li> </ul> </li> </ul> As you can see from the comments in the code above (for the two label elements) the description label disappears once I set a max-width on it (I don't have a max-width on the left label element, but it disappears nonetheless). The initial view of this UL menu is fine (note the expand class declaration which makes this part of the accordion open at startup. Its not until I click the "General Settings" to toggle it closed, then back open, that the left class elements disappear (and only in IE)

    Read the article

  • Wrapping <%= f.check_box %> inside <label>

    - by Ben Scheirman
    I have a list of checkboxes on a form. Due to the way the CSS is structured, the label element is styled directly. This requires me to nest the checkbox inside of the tag. This works in raw HTML, if you click on the label text, the state of the checkbox changes. It doesn't work with the rails <%= f.check_box %> helper, however, because it outputs a hidden input tag first. In summary, <label> <%= f.check_box :foo %> Foo </label> this is the output I want: <label> <input type="checkbox" ... /> <input type="hidden" ... /> Foo </label> ...but this is what rails is giving me: <label> <input type="hidden" ... /> <input type="checkbox" ... /> Foo </label> So the label behavior doesn't actually work :(. Is there any way to get around this?

    Read the article

  • Find Label Control in Repeater Asp.net

    - by user2769165
    I am using repeater and I want to find the label control in my repeater. here is my code <asp:Repeater ID="friendRepeater" runat="server"> <table cellpadding="0" cellspacing="0"> <ItemTemplate> <tr style=" width:700px; height:120px;"> <td> <div style=" padding-left:180px;"> <div id="leftHandPost" style="float:left; width:120px; height:120px; border: medium solid #cdaf95; padding-top:5px;"> <div id="childLeft" style=" padding-left:5px;"> <div id="photo" style=" border: thin solid black; width:100px;height:100px;"> <asp:Image id="photoImage" runat="server" ImageUrl='<%# String.Concat("Images/", Eval("Picture")) %>' Width="100px" Height="100px" /> </div> </div><!--childLeft--> </div><!--leftHandPost--> </div> </td> <td> <div id="rightHandPost" style=" float:right; padding-right:260px;"> <div id="childRight" style="width:400px; height:120px; border: medium solid #cdaf95; padding-top:5px; padding-left:10px;"> <strong><asp:Label id="lblName" runat="server"><%# Eval("PersonName") %></asp:Label></strong><br /> <div style=" float:right; padding-right:10px;"><asp:Button runat="server" Text="Add" onClick="add" /></div><br /> <asp:Label id="lblID" runat="server"><%# Eval("PersonID") %></asp:Label><br /> <asp:Label id="lblEmail" runat="server"><%# Eval("Email") %></asp:Label> </div><!--childRight--> </div><!--rightHandPost--> </td> </tr> </ItemTemplate> <AlternatingItemTemplate> <tr style=" width:700px; height:120px;"> <td> <div style=" padding-left:180px;"> <div id="Div1" style="float:left; width:120px; height:120px; border: medium solid #cdaf95; padding-top:5px;"> <div id="Div2" style="padding-left:5px;"> <div id="Div3" style=" border: thin solid black; width:100px;height:100px;"> <asp:Image id="photoImage" runat="server" ImageUrl='<%# String.Concat("Images/", Eval("Picture")) %>' Width="100px" Height="100px" /> </div> </div><!--childLeft--> </div><!--leftHandPost--> </div> </td> <td> <div id="Div4" style=" float:right; padding-right:260px;"> <div id="Div5" style="width:400px; height:120px; border: medium solid #cdaf95; padding-top:5px; padding-left:10px;"> <strong><asp:Label id="lblName" runat="server"><%# Eval("PersonName")%></asp:Label></strong> <div style=" float:right; padding-right:10px;"><asp:Button id="btnAdd" runat="server" Text="Add" onClick="add"></asp:Button></div><br /> <br /> <asp:Label id="lblID" runat="server"><%# Eval("PersonID") %></asp:Label><br /> <asp:Label id="lblEmail" runat="server"><%# Eval("Email") %></asp:Label> </div><!--childRight--> </div><!--rightHandPost--> </td> </tr> </AlternatingItemTemplate> <FooterTemplate> </table> </FooterTemplate> </asp:Repeater> Here is the code behind for the add button. protected void add(object sender, EventArgs e) { DateTime date = DateTime.Now; System.Web.UI.WebControls.Label la = (System.Web.UI.WebControls.Label)friendRepeater.FindControl("PersonID"); String id = la.Text; try { MySqlConnection connStr = new MySqlConnection(); connStr.ConnectionString = "Server = localhost; Database = healthlivin; Uid = root; Pwd = khei92;"; String insertFriend = "INSERT INTO contactFriend(friendID, PersonID, PersonIDB, date) values (@id, @personIDA, @personIDB, @date)"; MySqlCommand cmdInsertStaff = new MySqlCommand(insertFriend, connStr); cmdInsertStaff.Parameters.AddWithValue("@id", "F000004"); cmdInsertStaff.Parameters.AddWithValue("@personIDA", "M000001"); cmdInsertStaff.Parameters.AddWithValue("@personIDB", id); cmdInsertStaff.Parameters.AddWithValue("@date", date); connStr.Open(); cmdInsertStaff.ExecuteNonQuery(); MessageBox.Show("inserted"); connStr.Close(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } I have get the error of Object reference not set to an instance of an object. I think is because there are no value in the Label. The Find Control are not working. May I know how can fix this problem? Thank you very much

    Read the article

  • How apply a storyboard to a Label programmatically ?

    - by ThitoO
    Hi :), I've a little problem, I'd search google and my Wpf's books but I don't found any answer :( I have created a little storyboard : <Storyboard x:Key="whiteAnim" Duration="1"> <ColorAnimation By="Black" To="White" Storyboard.TargetProperty="Background" x:Name="step1"/> <ColorAnimation By="White" To="Black" Storyboard.TargetProperty="Background" x:Name="step2"/> </Storyboard> This animation will change background color from black to white, and from white to black. I want to "apply" this storyboard to a Label : Label label = new Label(); label.Content = "My label"; I'm looking for a method like "label.StartStoryboard(--myStoryboard--), do you have any ideas ? Thank you :)

    Read the article

  • @Html.Label won't allow string concatination

    - by MrGrigg
    I'm building dynamic forms based on a partial view. My view inherits a model with a single property: CatalogName { get; set; }. I have tried this: @Html.Label(Model.CatalogName + "-ProductNumber", "Product Number") @Html.TextBox(Model.CatalogName + "-ProductNumber") The HTML renders like this though: <label for>Product Number</label> <input name="CatatalogName-ProductNumber" type="text" /> If I write my code like this: @Html.Label("ProductNumber-" + Model.CatalogName", "Product Number") It will render the way I expect <label for="ProductNumber-CatalogName">Product Number</label> Is this a bug with MVC? Are there any answers to why my concatenation won't work the way I want it in the label, but works fine with the TextBox?

    Read the article

  • Modifying the Label Property(text and font) by a custom ComboBox

    - by BDotA
    I have created a custom combobox that has a LABEL property so when we drop it on a form, we can say the Label associated with this ComboBox is say Label2 this is what I wrote for its label property. The whole thing I want to do is that when I am assigning the Label property of my custom ComboBox to one of the labels on the form, I want that label to change its font to bold and also add an "*" to its Test property. thats it ... but it does not work! any ideas? private Label assignedLabelName; public Label AssignedLabelName { get { return assignedLabelName; } set { assignedLabelName = value; assignedLabelName.Text = "*" + assignedLabelName.Text; assignedLabelName.Font = new Font(AssignedLabelName.Font, FontStyle.Bold); } }

    Read the article

  • How to change a label's text after loading a html into a dialog

    - by Salsa
    I am opening a modal dialog by loading a form into it. After loading the form, I want to change it's title and one of it's fields' label. I can change the label's text, but after the function returns, the label's text turns back to it's original one. Is it possible to make this kind of change and if so, how? The HTML: <form action="testing.php" method="POST" id="example-form"> <fieldset> <label for="link" id="link-label"></label> </fieldset> </form> The javascript: $(".bt-example").button().click(function() { $('#example-dialog').load('form.html').dialog('open'); $('.ui-dialog-titlebar').text("THIS WORKS!"); $('#example-form #link-label').text("CHANGES AT FIRST, BUT GOES BLANK LATER"); $('#example-dialog').removeClass('invisible'); });

    Read the article

  • Persistence problem when installing USB Ubuntu variant using Windows

    - by Derek Redfern
    I'm part of a project called One2One2Go - we're developing a Live USB Ubuntu variant for use in schools in Somerville, MA. We have the project files compiled into an iso, and when installed using the native Ubuntu Startup Disk Creator, the USB works fine. When installed using a tool on a Windows machine (LiLi at linuxliveusb.com or liveusb-creator at fedorahosted.org/liveusb-creator), the USB works, but does not have persistence. This happens even if the creator is specifically set to allocate an area for persistent files. When comparing files on sticks created in Windows or Ubuntu, the one file that is different is syslinux/syslinux.cfg. I have printed the contents of the file below: Installed on Windows: DEFAULT nomodset LABEL debug menu label ^debug kernel /casper/vmlinuz append boot=casper xforcevesa initrd=/casper/initrd.gz -- LABEL nomodset menu label ^nomodset kernel /casper/vmlinuz append boot=casper quiet splash nomodset initrd=/casper/initrd.gz -- LABEL memtest menu label ^Memory test kernel /install/memtest append - LABEL hd menu label ^Boot from first hard disk localboot 0x80 append - PROMPT 0 TIMEOUT 1 Installed on Ubuntu: DEFAULT nomodset LABEL debug menu label ^debug kernel /casper/vmlinuz append noprompt cdrom-detect/try-usb=true persistent boot=casper xforcevesa initrd=/casper/initrd.gz -- LABEL nomodset menu label ^nomodset kernel /casper/vmlinuz append noprompt cdrom-detect/try-usb=true persistent boot=casper quiet splash nomodset initrd=/casper/initrd.gz -- LABEL memtest menu label ^Memory test kernel /install/memtest append - LABEL hd menu label ^Boot from first hard disk localboot 0x80 append - PROMPT 0 TIMEOUT 1 For troubleshooting reasons, I changed the Windows-created syslinux.cfg to match the one created by Ubuntu and persistence worked on it. I think the problem is that on the stick created by Windows, there is no "persistent" flag, but I don't know why. Is this a problem with our disk image or with the creator? How would I go about fixing this problem? Thanks in advance for your help. Derek Redfern

    Read the article

  • How to set PyGtk toolbuttons label color?

    - by Voidcode
    I am just beginning learning Quickly and PyGtk, after see this info-video on Ubuntu-develperment. As in the video I am adding a toolbar to my glade-file, then some buttons. To style the toolbar for ubuntu I do: self.toolbar = self.builder.get_object("toolbar") context = self.toolbar.get_style_context() context.add_class(Gtk.STYLE_CLASS_PRIMARY_TOOLBAR) The style works, But the label-text-color for the buttons look like this: How can I changes the text color?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >