Prev: Deleting multiple rows in Datagrid
Next: New in VS 2008
From: Luc on 14 Aug 2010 06:34 Hi, i want the first item in the dropdownlist to be red and bold (VB.net). Red works, but not bold. An suggestion is welcome. Thanks Luc z1 = New ListItem("choose an item", 0) z1.Attributes.Add("style", "font-bold:true;background-color:red") DropDownList1.Items.Add(z1)
From: Stefano Frosio on 14 Aug 2010 08:45 > z1.Attributes.Add("style", > "font-bold:true;background-color:red") Use "font-weight:bold;background-color:red". HTH, -- Stefano Frosio www.esse-effe.com
From: Luc on 14 Aug 2010 09:52 thanks for answering, but i tried that too without succes .. "Stefano Frosio" <stefanofrosioNIENTESPAM(a)GRAZIEgmail.com> schreef in bericht news:4c668fff$0$18993$4fafbaef(a)reader5.news.tin.it... >> z1.Attributes.Add("style", "font-bold:true;background-color:red") > > Use "font-weight:bold;background-color:red". > > HTH, > > -- > Stefano Frosio > www.esse-effe.com >
From: Registered User on 14 Aug 2010 11:59 On Sat, 14 Aug 2010 15:52:41 +0200, "Luc" <ll(a)nospam> wrote: >thanks for answering, but i tried that too without succes .. > I believe that style is a collection of attributes rather than a specific attribute. In any case this is works for me. z1.Attributes.Add("font-weight", "bold"); z1.Attributes.Add("background-color", "red"); regards A.G. >"Stefano Frosio" <stefanofrosioNIENTESPAM(a)GRAZIEgmail.com> schreef in >bericht news:4c668fff$0$18993$4fafbaef(a)reader5.news.tin.it... >>> z1.Attributes.Add("style", "font-bold:true;background-color:red") >> >> Use "font-weight:bold;background-color:red". >> >> HTH, >> >> -- >> Stefano Frosio >> www.esse-effe.com >> >
From: Luc on 14 Aug 2010 13:21
It still doesn't work to me. I found this comment about this: "Hi, you can not bold the list or combo box items invidually, even you can not change the font styles of a single item except forecolors. " Sure it works to you? "Registered User" <n4jvp(a)ix.netcom.com> schreef in bericht news:b4fd661vonr8b1vhphqv4vouplbssm212m(a)4ax.com... > On Sat, 14 Aug 2010 15:52:41 +0200, "Luc" <ll(a)nospam> wrote: > >>thanks for answering, but i tried that too without succes .. >> > I believe that style is a collection of attributes rather than a > specific attribute. In any case this is works for me. > > z1.Attributes.Add("font-weight", "bold"); > z1.Attributes.Add("background-color", "red"); > > regards > A.G. > >>"Stefano Frosio" <stefanofrosioNIENTESPAM(a)GRAZIEgmail.com> schreef in >>bericht news:4c668fff$0$18993$4fafbaef(a)reader5.news.tin.it... >>>> z1.Attributes.Add("style", "font-bold:true;background-color:red") >>> >>> Use "font-weight:bold;background-color:red". >>> >>> HTH, >>> >>> -- >>> Stefano Frosio >>> www.esse-effe.com >>> >> |