Search Results

Search found 1381 results on 56 pages for 'bold'.

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

  • How to highlight matching sub-strings inside a ListBox?

    - by Kishore Kumar
    I have one TextBox and one listbox for searching a collection of data. While searching a text inside a Listbox if that matching string is found anywhere in the list it should show in Green color with Bold. eg. I have string collection like "Dependency Property, Custom Property, Normal Property". If I type in the Search Text box "prop" all the Three with "prop" (only the word Prop) should be in Bold and its color should be in green. Any idea how it can be done?. Data inside listbox is represented using DataTemplate.

    Read the article

  • SelectedItem in ListView binding

    - by Matt
    I'm new in wfp. In my sample application I'm using a ListView to display contents of property. I don't know how to bind SelectedItem in ListView to property and then bind to TextBlock. Window.xaml <Window x:Class="Exec.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Main window" Height="446" Width="475" > <Grid> <ListView Name="ListViewPersonDetails" Margin="15,12,29,196" ItemsSource="{Binding Persons}" SelectedItem="{Binding CurrentSelectedPerson}"> <ListView.View> <GridView> <GridViewColumn Header="FirstName" DisplayMemberBinding="{Binding FstNamePerson}"/> <GridViewColumn Header="LastName" DisplayMemberBinding="{Binding SndNamePerson}"/> <GridViewColumn Header="Address" DisplayMemberBinding="{Binding AdressPerson}"/> </GridView> </ListView.View> </ListView> <TextBlock Height="23" Name="textFirstNameBlock" FontSize="12" Margin="97,240,155,144"> <Run Text="Name: " /> <Run Text="{Binding CurrentSelectedPerson.FstNamePerson}" FontWeight="Bold" /> </TextBlock> <TextBlock Height="23" Name="textLastNameBlock" FontSize="12" Margin="97,263,155,121"> <Run Text="Branch: " /> <Run Text="{Binding CurrentSelectedPerson.SndNamePerson}" FontWeight="Bold" /> </TextBlock> <TextBlock Height="23" Name="textAddressBlock" FontSize="12" Margin="0,281,155,103" HorizontalAlignment="Right" Width="138"> <Run Text="City: " /> <Run Text="{Binding CurrentSelectedPerson.AdressPerson}" FontWeight="Bold" /> </TextBlock> </Grid> </Window> MainWindow.xaml.cs Tman manager = new Tman(); private List<Person> persons; public List<Person> Persons { get { return this.persons; } set { if (value != null) { this.persons = value; this.NotifyPropertyChanged("Data"); } } } private Person currentSelectedPerson; public Person CurrentSelectedPerson { get { return currentSelectedPerson; } set { this.currentSelectedPerson = value; this.NotifyPropertyChanged("CurrentSelectedItem"); } } public event PropertyChangedEventHandler PropertyChanged; private void NotifyPropertyChanged(string propertyName) { var handler = this.PropertyChanged; if (handler != null) { handler(this, new PropertyChangedEventArgs(propertyName)); } } private void Window_Loaded(object sender, RoutedEventArgs e){ ListViewPersonDetails.ItemsSource= manager.GetPersons(); } Person.cs class Person { public string FirstName { get; set; } public string LastName { get; set; } public string Address { get; set; } } Thanks for any help.

    Read the article

  • Class not overwriting with addClass

    - by scatteredbomb
    I'm using jQuery's addClass to add a class to an tab so when clicked it'll change the class so it's obvious the tab is highlighted. My HTML <div id="mainNav"> <ul> <li id="LinktheBand" onclick="nav('theBand')">The Band</li> <li id="linkTheMusic" onclick="nav('theMusic')">The Music</li> My CSS #mainNav li { float:left; margin-right:5px; color:white; font-family:Tahoma; font-weight:bold; padding: 10px 8px 0px 8px; background:url('../images/transparent-65.png'); height:40px; height: 25px !important; border:1px solid #000; } #mainNav li:hover { float:left; margin-right:5px; color:white; font-family:Tahoma; font-weight:bold; padding: 10px 8px 0px 8px; background: #660000; height:40px; height: 25px !important; border:1px solid #660000; } .mainNavSelected { float:left; margin-right:5px; color:white; font-family:Tahoma; font-weight:bold; padding: 10px 8px 0px 8px; background: #660000; height:40px; height: 25px !important; border:1px solid #660000; } My Javascript function nav(a) { $('#'+a).show(); $('#Link'+a).addClass('mainNavSelected'); } This works properly, I check firebug and can see the class="mainNavSelected" is added, but the list element doesn't take any properties of the new class. Firebug lists all the class items for mainNavSelected, but has them all crossed out. What am i missing to replace the class of this element?

    Read the article

  • CKeditor 3.0 - How to know which toolbar button is clicked

    - by understack
    Hi, I want to update few variables when any of the toolbar button (like bold, italic etc) is clicked. I'm unable to trap 'click' event on any of these buttons. Could somebody give me an example when clicking on 'bold' button would also pop up an alert box? How can I trap 'paste' event? I've googled a lot and searched ckeditor forum but couldn't find any solution. Any pointer would be really helpful. Thanks.

    Read the article

  • How to do custom jquery lives in 1.4.1?

    - by chobo2
    Hi I been sort of using jquery livequery plugin and jquery live together. However now that I am using 1.4 it seems jquery livequery is not working 100%. So I am not sure how to tackle this problem I have this in livequery $('#Description').livequery(function () { $('#Description').htmlarea({ toolbar: [ ["bold", "italic", "underline", "strikethrough", "|", "subscript", "superscript"], ["increasefontsize", "decreasefontsize"], ["orderedlist", "unorderedlist"], ["indent", "outdent"], ["link", "unlink"] ] }); }); So everytime I loaded up my page. It would actually run that code in the livequery and display and if I went to another ajax tab and come back it would go into this again. Now I am not sure how to change it to .live() jquery 1.4 since I just tried to do this $('#Description').live(function () { $('#Description').htmlarea({ toolbar: [ ["bold", "italic", "underline", "strikethrough", "|", "subscript", "superscript"], ["increasefontsize", "decreasefontsize"], ["orderedlist", "unorderedlist"], ["indent", "outdent"], ["link", "unlink"] ] }); }); and it does not seem to work. the plugin is not binded and the rich html editor is not displayed.

    Read the article

  • Vimrc: how to reuse code and definitions for differnt file types?

    - by sixtyfootersdude
    I have defined my own file types using vim. For example I have: .classNotes .reportJotNotes .homework These file types are defined in .vim files: ~/.vim/syntax/homework.vim ~/.vim/syntax/reportJotNotes.vim ~/.vim/syntax/homework.vim Many of these things have several of the same code in them. Ie they all have this for titles: syn region JakeTitle start=+=== + end=+===+ oneline highlight JakeTitle ctermbg=black ctermfg=Yellow syn region JakeMasterTitle start=+==== + end=+====+ oneline highlight JakeMasterTitle cterm=bold term=bold ctermbg=black ctermfg=LightBlue Instead of having this in all three .vim files I would rather have it in one file and then in each file could source it. How can I do this?

    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

  • Sending JSON collection to ASMX webservice

    - by Mironline
    I have got this json collection in page : var json= { "Elements": [ {"Alignment":null,"Bold":false}, {"Alignment":null,"Bold":false} ], "Front":true, "ThemeID":"9" }; I've generated this JSON in run-time & posted to page. my question is , What is the best solution to send this json to web-service using jQuery. should I use the JSON.stringify method and sent it as as string ? if yes what is the input type in web-service ? can I send it as an object to web-service and set the List<CusomeObject> as input ? in this case how can I implement that ?

    Read the article

  • jquery textarea custom tags replacement

    - by Tim
    Hi all, I'm basically trying to create my own tags - and replace them with the right HTML tags. So {B} {/B} would turn into <b> </b> I have only got so far with this, here: http://www.nacremedia.com/text2.htm Use the [B] button to bold stuff the current selection... it creates two bold tags and one closing for some reason. I'm so close! But I just need a bit of direction to get the final bugs out - can anyone please help?? Also, if there is a better way of doing this altogether then I am more than welcome to new ideas.

    Read the article

  • CSS: set font weight depending on fallback font

    - by mikez302
    I am trying to set the font-weight for an element based on the font that gets chosen. For example, I may be trying to do something like this: h1 { font-family: Arial Narrow, Impact, sans-serif; font-weight: ?; } Let's say I want the font-weight to be "bold" if the user has Arial Narrow installed on their system, but "normal" if the browser has to use Impact, and maybe "bold" if the user's system has neither of those fonts. Is this possible? If so, how would I go about doing this?

    Read the article

  • Drop Down not even showing up in IE6

    - by blackessej
    I've got a drop down menu here that just plain won't show up in IE6. The site works perfectly in every other browser. Seems daft to lose sleep over IE6, I know, but the site is for a demographic who could very well still be using it. Here's the CSS: html { height:100%; } body, p, a, ul, li, ol, h1, h2, h3, h4, h5, h6 { margin:0; padding:0; } body { behavior:url("csshover3.htc"); font-size:14px; font-family:Arial, Helvetica, sans-serif; background-color:#d3d3d3; height:100%; } h1 { font-size:18px; color:#752eca; text-decoration:none; } h2 { font-size:14px; color:#909090; text-decoration:none!important; } p { text-indent:20px; color:#000; } p a { color:#000; text-decoration:underline; } p.foot { text-indent:0px; } p.link { font-size:18px; color:#30F; text-decoration:underline!important; } a { color:#4d2288; text-decoration:none; outline:none; } a:visited { color:#4d2288; } p a:hover { text-decoration:underline!important; } ul#nav { padding:5px; margin:0px auto; width:100%; } ul#nav li a { display:block; font-weight:bold; padding:2px 10px; background:#bacddb; } ul#nav li a:hover { background:#888; color:#fff; } li { list-style:none; float:left; position:relative; width:225px; text-align:center; margin:0px auto; margin-right:4px; border:1px solid #4d2288; } li ul { display:none; position:relative; width:auto; top:0; left:0; margin-left:-1px; } li>ul { top:auto; left:auto; border-top:none; } li:hover ul, li.over ul { display:block; } ul#nav li.current a { background:#b8ab28; } ul#nav li.current a:hover { background:#888; } img { margin:10px 0 5px; } *html img { margin:20px; } .coltextimg { position:relative; float:left; background-position:left bottom; padding:0px 20px 10px 0px; border:none; } #maincontent { width:940px; margin:0px auto; postition:absolute; } *html #maincontent { margin-left:42px; } #header { float:left; width:100%; height:auto!important; height:100%; min-height:100%; margin:0px auto; background-image:url(images/banner_test.jpg); background-repeat:no-repeat; border:2px solid #752eca; -webkit-border-top-left-radius:10px; -webkit-border-top-right-radius:10px; -moz-border-radius-topleft:10px; -moz-border-radius-topright:10px; border-top-left-radius:10px; border-top-right-radius:10px; } .colmask { position:relative; margin-top:160px; clear:both; float:left; width:100%; overflow:hidden; } .colright, .colmid { float:left; width:100%; position:relative; } .col1, .col2 { float:left; position:relative; padding:10px 0 1em 0; overflow:hidden; } .twocol { background:#fff; } .twocol .colmid { right:45%; background:#fff; } .twocol .col1 { width:51%; left:47%; text-align:justify; z-index:0; } .twocol .col2 { width:41%; left:51%; text-align:justify; z-index:0; } .twocol .colimg { border:2px solid #a0a0a0; } .twocol .colvid1 { width:360px; height:240px; } .twocol .colvid2 { width:360px; height:240px; } #footer { text-align:center; font-size:9px; padding:10px 0 1em 0; clear:both; width:100%; height:100%; } *html #footer { height:43px; } #footer p a { text-decoration:none; } #lyr_ddmenu { position:absolute; z-index:1; height:10px; top:120px; float:left; width:1000px; margin:0px auto; padding:5px; } #contact { position:absolute; float:right; font-size:10px; } A.Controls:link { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:visited { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:active { color:#666666; text-decoration:none; font-weight:bold; } A.Controls:hover { color:#be0000; text-decoration:none; font-weight:bold; } And here's the html I'm having the specific problem with: <div id="maincontent"> <div id="header"> <div id="lyr_ddmenu"> <ul id="nav"> <li class="current"><href here...</a> <ul class="sub"> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> </ul></li> <li><href here...</a></li> <ul class="sub"> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> <li><href here...</a></li> </ul></li> <li><href here...</a></li> <li><href here...</a></li> <ul class="sub"> <li><href here...</a></li> </ul></li> </ul> </div> Thanks!

    Read the article

  • WPF- Is there a way to stop TreeViewItems from becoming selected and activated when thier parent TreeViewItem is selected?

    - by Justin
    I have a control template for TreeViewItems and instead of showing the normal FocusVisualStyle I have a MultiTrigger set up like this: <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsSelected" Value="true"/> <Condition Property="IsSelectionActive" Value="true"/> </MultiTrigger.Conditions> <Setter Property="FontWeight" Value="Bold"/> </MultiTrigger> However this also causes the FontWeight to change to bold when a TreeViewItem's parent item is selected. Is there any way I can stop that from happening?

    Read the article

  • How to show string inside string in different color?

    - by Kishore Kumar
    I have one TextBox and One listbox for searching a collection of data. While searching a text inside a Listbox if that matching string found in anywhere in the list it should show in Green color with Bold. eg. I have string collection like "Dependency Property, Custom Property, Normal Property" if i type in the Search Text box "prop" all the Three with "prop" (only the word Prop) should be in Bold and its color should be in green. any idea how it can be done?. Data inside listbox is represented using DataTemplate.

    Read the article

  • Help for CSS Menu Dropdown, FF OK and IE6 Problem

    - by Taruhku
    IE Problem, FF OK. Please help..???? Screen Shoot problem click here This is my CSS dolphincontainer { position:relative; height:56px; color:#E0E0E0; background:#143D55; width:100%; font-family:Tahoma; left: 0px; } dolphinnav {position:absolute;;height:33px;font-size:12px;font-weight:bold;background:#fff url(images/dolphin_bg.gif) repeat-x bottom left;padding:0 0 0 10px;width:975px;} dolphinnav ul {margin:0;padding:0;list-style-type:none;width:auto;float:left;} dolphinnav ul li {display:block;float:left;margin:0 1px;} dolphinnav ul li a {display:block;float:left;color:#001b2c;text-decoration:none;padding:0 0 0 10px;height:33px;} dolphinnav ul li a span {padding:12px 20px 0 0;height:21px;float:left;font-weight:bold;} dolphinnav ul li a:hover {color:#fff;background:transparent url(images/dolphin_bg-OVER.gif) repeat-x bottom left;} dolphinnav ul li a:hover span {display:block;width:auto;cursor:pointer;} dolphinnav ul li a.current,#dolphinnav ul li a.current:hover {color:#fff;background:#00517e url(images/dolphin_left-ON.gif) no-repeat top left;line-height:275%;} dolphinnav ul li a.current span {display:block;padding:0 20px 0 0;width:auto;background:#00517e url(images/dolphin_right-ON.gif) no-repeat top right;height:33px;} .tuckUp { display:block; width:90px; height:30px; overflow:hidden; cursor:pointer; } .pullDown { width:90px; height:56px; } .item a:link, .item a:visited { display:inline; float:left; background:#fff url(images/dolphin_bg.gif) repeat-x top left;padding:0 0 0 10px; text-align:left; color:#444; font-size:11px; font-weight:bold; text-decoration:none; line-height:25px; margin:0 5px 0px 0px; width:80px; } .item a:hover { display:inline; float:left; background:#39c; color:#FFF; text-decoration:none; text-align:left; font-size:11px; font-weight:700; font-weight:bold; line-height:25px; padding:0 0 0 10px; margin:0 5px 0px 0px; width:80px; } HTML: <div id="dolphincontainer"> <div id="dolphinnav"> <ul> <li><a href="index.php"><span>Home</span></a></li> <li><a href="chooseus.php"><span>Why Choose Us</span></a></li> <li><a href="peraturan.php"><span>Rules</span></a></li> <li class="tuckUp" onmousemove="this.className='pullDown'" onmouseout="this.className='tuckUp'"><a href="#"><span>Transaction</span></a> <div class="item"> <a href="drop1.php">Drop Down 1</a><br /> <a href="drop2.php">Drop Down 2</a></a><br /> <a href="drop3.php">Drop Down 3</a><br /> </div> </li> <li><a href="download.php"><span>Download</span></a></li> <li><a href="aboutus.php"><span>About Us</span></a></li> <li><a href="help.php" class="current"><span>Support</span></a></li> <li><a href="promo.php"><span><font color="#FF0000"><blink>PROMO</blink> </font></span></a></li> </ul> </div> </div>

    Read the article

  • javascript font size not working

    - by Fernando SBS
    why this don´t work: function rp_insertTable() { FM_log(3,"rp_insertTable() called"); var farmTable = dom.cn("table"); var ftableBody = dom.cn("tbody"); var i; var maximize = GM_getValue("Maximize_" + suffixGlobal, 0); farmTable.className = "FMtbg"; farmTable.id = "farmMachineTable"; farmTable.setAttribute('cellpadding', 2); farmTable.setAttribute('cellspacing', 1); farmTable.style.marginBotton = "12px"; farmTable.style.font = "bold 12px arial,serif"; farmTable.style.font = "bold 12px arial,serif"; the font does change in format, but the font size is not working, I can put 100px and it deosn´t change anything, why is that?

    Read the article

  • is there a way to show what field you updated in mysql?

    - by ggfan
    When users edit their account, I want to display a confirmation page that shows their updated information with the fields that they changed in bold. Is there a mysql statement that allows you to select the fields that a user changes? If not, how exactly can I achieve this Ex: (editaccount.php) first_name: bob last_name: builder email: [email protected] When they change say their first name to "james", the confirmation page shows their first name in bold because they changed that but the other areas are still normal text. first_name: <b>James</b> last_name: builder email: [email protected]

    Read the article

  • How to decode U.P.S. Information from UPS MaxiCode Barcode?

    - by user46482
    I recently purchased a 2D Barcode reader. When scanning a U.P.S. barcode, I get about half of the information I want, and about half of it looks to be encrypted in some way. I have heard there is a UPS DLL. Example - Everything in bold seems to be encrypted, while the non-bold text contains valuable, legitimate data. [)01961163522424800031Z50978063UPSN12312307G:%"6*AH537&M9&QXP2E:)16(E&539R'64O In other words, this text seems OK - and I can parse the information [)01961163522424800031Z50978063UPSN123123 ... While, this data seems to be encrypted ... 07G:%"6*AH537&M9&QXP2E:)16(E&539R'64O Any Ideas???

    Read the article

  • UILabel with custom font displays *wrong* custom font

    - by winsmith
    I'm using this method to embed custom fonts in my iPhone app. The embedding works: When I run the following code, the fonts are listed. (Currently, I'm embedding all family members of Myriad Pro in OTF format) for( NSString *familyName in [UIFont familyNames] ){ for( NSString *fntName in [UIFont fontNamesForFamilyName:familyName] ){ NSLog(@"%@", fntName); }} When I try to set the font of a label to MyriadPro or MyriadPro-Bold, this works just as expected. However, when I set the font to MyriadPro-BoldCond, the label is still set in MyriadPro-Bold instead of the condensed version. (The font names are correct, I checked.) My Code: [recommendationLabel setFont:[UIFont fontWithName:@"MyriadPro-BoldCond" size:140]]; recommendationLabel.adjustsFontSizeToFitWidth = YES; What's the deal?

    Read the article

  • what is the relation between actual pixels and html(css) pixels in blackberry?

    - by HelpMeToHelpYou
    I am implementing one phonegap application. here everything going fine but when i am talking device specifications like 1)BlackBerry Bold Touch 9900 Screen specifications are as following Body Dimensions 115 x 66 x 10.5 mm (4.53 x 2.60 x 0.41 in) Weight 130 g (4.59 oz) Keyboard QWERTY Display Type TFT capacitive touchscreen, 16M colors Size 640 x 480 pixels, 2.8 inches (~286 ppi pixel density) But when i test following function in java script function findScreenSize() { alert("width:"+window.innerWidth +"Height:"+ window.innerHeight); } it displaying SIZE width : 356 Height : 267 (356 x 267) 2)BlackBerry Bold Touch 9930 Screen specifications are as following Body Dimensions 115 x 66 x 10.5 mm (4.53 x 2.60 x 0.41 in) Weight 130 g (4.59 oz) Keyboard QWERTY - Touch-sensitive controls Display Type TFT capacitive touchscreen, 16M colors Size 640 x 480 pixels, 2.8 inches (~286 ppi pixel density) then i run same javaScript function i got following output it displaying SIZE width : 417 Height : 313 (417 x 313) why it is behaving like this ? Can anybody know relation between core pixel and HTML pixel please give answer

    Read the article

  • Regex to delete HTML within <table> tags

    - by johnv
    I have an HTML document in .txt format containing multiple tables and other texts and I am trying to delete any HTML (anything within "<") if it's inside a table (between and ). For example: =================== other text <other HTML> <table> <b><u><i>bold underlined italic text</b></u></i> </table> other text <other HTML> ============== The final output would be as the following. Note that only HTML within and are removed. ============== other text <other HTML> <table> bold underlined italic text </table> other text <other HTML> ============= Any help is greatly appreciated!

    Read the article

  • Firefox 17.0.1 ignoring font-weight

    - by jphogan
    http://iamsinc.com/blog/new-producer-bonus/ For some reason Firefox 17.0.1 on my Windows 7 machine is ignoring the font-weight of the td elements. It should be normal. This works fine in Chrome, IE 7 8, & 9, but not in FF. I have also tested it on an XP machine running 17.0.1 and it works fine. The font-weight should be normal, not bold. In the second box down ($300k level), the font-weight is showing up as bold on Win 7 FF 17.0.1 which pushes the pictures outside of the box. I have even tried reducing the font-weight waaay down and it has not effect on the problematic FF browser Does anybody have a solution or even a work-around? I hate to make the pictures all smaller just to work around this. Thanks!

    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

  • T-SQL Tuesday #31: Paradox of the Sawtooth Log

    - by merrillaldrich
    Today’s T-SQL Tuesday, hosted by Aaron Nelson ( @sqlvariant | sqlvariant.com ) has the theme Logging . I was a little pressed for time today to pull this post together, so this will be short and sweet. For a long time, I wondered why and how a database in Full Recovery Mode, which you’d expect to have an ever-growing log -- as all changes are written to the log file -- could in fact have a log usage pattern that looks like this: This graph shows the Percent Log Used (bold, red) and the Log File(s)...(read more)

    Read the article

  • QotD: Justin Kestelyn, Editor in Chief of Java Magazine on OpenJDK

    - by $utils.escapeXML($entry.author)
    Things have changed now. Java SE 7 is available, and Java SE 8 is on the way; Java developer conferences around the world are selling out in short order; Java skills are in high demand by recruiters; and the Java community is reinvigorated thanks to efforts including the OpenJDK project, the Adopt-a-JSR program, and—if I may be so bold—even this publication.Justin Kestelyn, Editor in Chief of the Java Magazine, in the opening 'from the editor' article in the magazine's March/April edition.

    Read the article

  • Changing CSS with jQuery syntax in Silverlight using jLight

    - by Timmy Kokke
    Lately I’ve ran into situations where I had to change elements or had to request a value in the DOM from Silverlight. jLight, which was introduced in an earlier article, can help with that. jQuery offers great ways to change CSS during runtime. Silverlight can access the DOM, but it isn’t as easy as jQuery. All examples shown in this article can be looked at in this online demo. The code can be downloaded here.   Part 1: The easy stuff Selecting and changing properties is pretty straight forward. Setting the text color in all <B> </B> elements can be done using the following code:   jQuery.Select("b").Css("color", "red");   The Css() method is an extension method on jQueryObject which is return by the jQuery.Select() method. The Css() method takes to parameters. The first is the Css style property. All properties used in Css can be entered in this string. The second parameter is the value you want to give the property. In this case the property is “color” and it is changed to “red”. To specify which element you want to select you can add a :selector parameter to the Select() method as shown in the next example.   jQuery.Select("b:first").Css("font-family", "sans-serif");   The “:first” pseudo-class selector selects only the first element. This example changes the “font-family” property of the first <B></B> element to “sans-serif”. To make use of intellisense in Visual Studio I’ve added a extension methods to help with the pseudo-classes. In the example below the “font-weight” of every “Even” <LI></LI> is set to “bold”.   jQuery.Select("li".Even()).Css("font-weight", "bold");   Because the Css() extension method returns a jQueryObject it is possible to chain calls to Css(). The following example show setting the “color”, “background-color” and the “font-size” of all headers in one go.   jQuery.Select(":header").Css("color", "#12FF70") .Css("background-color", "yellow") .Css("font-size", "25px");   Part 2: More complex stuff In only a few cases you need to change only one style property. More often you want to change an entire set op style properties all in one go.  You could chain a lot of Css() methods together. A better way is to add a class to a stylesheet and define all properties in there. With the AddClass() method you can set a style class to a set of elements. This example shows how to add the “demostyle” class to all <B></B> in the document.   jQuery.Select("b").AddClass("demostyle");   Removing the class works in the same way:   jQuery.Select("b").RemoveClass("demostyle");   jLight is build for interacting with to the DOM from Silverlight using jQuery. A jQueryObjectCss object can be used to define different sets of style properties in Silverlight. The over 60 most common Css style properties are defined in the jQueryObjectCss class. A string indexer can be used to access all style properties ( CssObject1[“background-color”] equals CssObject1.BackgroundColor). In the code below, two jQueryObjectCss objects are defined and instantiated.   private jQueryObjectCss CssObject1; private jQueryObjectCss CssObject2;   public Demo2() { CssObject1 = new jQueryObjectCss { BackgroundColor = "Lime", Color="Black", FontSize = "12pt", FontFamily = "sans-serif", FontWeight = "bold", MarginLeft = 150, LineHeight = "28px", Border = "Solid 1px #880000" }; CssObject2 = new jQueryObjectCss { FontStyle = "Italic", FontSize = "48", Color = "#225522" }; InitializeComponent(); }   Now instead of chaining to set all different properties you can just pass one of the jQueryObjectCss objects to the Css() method. In this case all <LI></LI> elements are set to match this object.   jQuery.Select("li").Css(CssObject1); When using the jQueryObjectCss objects chaining is still possible. In the following example all headers are given a blue backgroundcolor and the last is set to match CssObject2.   jQuery.Select(":header").Css(new jQueryObjectCss{BackgroundColor = "Blue"}) .Eq(-1).Css(CssObject2);   Part 3: The fun stuff Having Silverlight call JavaScript and than having JavaScript to call Silverlight requires a lot of plumbing code. Everything has to be registered and strings are passed back and forth to execute the JavaScript. jLight makes this kind of stuff so easy, it becomes fun to use. In a lot of situations jQuery can call a function to decide what to do, setting a style class based on complex expressions for example. jLight can do the same, but the callback methods are defined in Silverlight. This example calls the function() method for each <LI></LI> element. The callback method has to take a jQueryObject, an integer and a string as parameters. In this case jLight differs a bit from the actual jQuery implementation. jQuery uses only the index and the className parameters. A jQueryObject is added to make it simpler to access the attributes and properties of the element. If the text of the listitem starts with a ‘D’ or an ‘M’ the class is set. Otherwise null is returned and nothing happens.   private void button1_Click(object sender, RoutedEventArgs e) { jQuery.Select("li").AddClass(function); }   private string function(jQueryObject obj, int index, string className) { if (obj.Text[0] == 'D' || obj.Text[0] == 'M') return "demostyle"; return null; }   The last thing I would like to demonstrate uses even more Silverlight and less jLight, but demonstrates the power of the combination. Animating a style property using a Storyboard with easing functions. First a dependency property is defined. In this case it is a double named Intensity. By handling the changed event the color is set using jQuery.   public double Intensity { get { return (double)GetValue(IntensityProperty); } set { SetValue(IntensityProperty, value); } }   public static readonly DependencyProperty IntensityProperty = DependencyProperty.Register("Intensity", typeof(double), typeof(Demo3), new PropertyMetadata(0.0, IntensityChanged));   private static void IntensityChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { var i = (byte)(double)e.NewValue; jQuery.Select("span").Css("color", string.Format("#{0:X2}{0:X2}{0:X2}", i)); }   An animation has to be created. This code defines a Storyboard with one keyframe that uses a bounce ease as an easing function. The animation is set to target the Intensity dependency property defined earlier.   private Storyboard CreateAnimation(double value) { Storyboard storyboard = new Storyboard(); var da = new DoubleAnimationUsingKeyFrames(); var d = new EasingDoubleKeyFrame { EasingFunction = new BounceEase(), KeyTime = KeyTime.FromTimeSpan(TimeSpan.FromSeconds(1.0)), Value = value }; da.KeyFrames.Add(d); Storyboard.SetTarget(da, this); Storyboard.SetTargetProperty(da, new PropertyPath(Demo3.IntensityProperty)); storyboard.Children.Add(da); return storyboard; }   Initially the Intensity is set to 128 which results in a gray color. When one of the buttons is pressed, a new animation is created an played. One to animate to black, and one to animate to white.   public Demo3() { InitializeComponent(); Intensity = 128; }   private void button2_Click(object sender, RoutedEventArgs e) { CreateAnimation(255).Begin(); }   private void button3_Click(object sender, RoutedEventArgs e) { CreateAnimation(0).Begin(); }   Conclusion As you can see jLight can make the life of a Silverlight developer a lot easier when accessing the DOM. Almost all jQuery functions that are defined in jLight use the same constructions as described above. I’ve tried to stay as close as possible to the real jQuery. Having JavaScript perform callbacks to Silverlight using jLight will be described in more detail in a future tutorial about AJAX or eventing.

    Read the article

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