From: Registered User on
On Sat, 14 Aug 2010 19:21:05 +0200, "Luc" <ll(a)nospam> wrote:

>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?
>
I was unaware of the specific control and thinking general html
controls. If z1 is of type System.Web.UI.WebControls.DropDownList why
not simply use the object's properties to manipulate the list
properties.

z1.Font.Bold = true;
z1.ForeColor = Color.Red;

If you want to manipulate the individual elements of the list you
should investigate deriving a suitable control. Here is a good place
to start.

http://msdn.microsoft.com/en-us/library/aa479311.aspx

regards
A.G.

>"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
>>>>
>>>
>
From: Luc on
Yes, i need to manipulate individual elements.
thanks.

"Registered User" <n4jvp(a)ix.netcom.com> schreef in bericht
news:eemd66dhu4m8t5fkds8d0qocuo2s2m4stk(a)4ax.com...
> On Sat, 14 Aug 2010 19:21:05 +0200, "Luc" <ll(a)nospam> wrote:
>
>>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?
>>
> I was unaware of the specific control and thinking general html
> controls. If z1 is of type System.Web.UI.WebControls.DropDownList why
> not simply use the object's properties to manipulate the list
> properties.
>
> z1.Font.Bold = true;
> z1.ForeColor = Color.Red;
>
> If you want to manipulate the individual elements of the list you
> should investigate deriving a suitable control. Here is a good place
> to start.
>
> http://msdn.microsoft.com/en-us/library/aa479311.aspx
>
> regards
> A.G.
>
>>"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
>>>>>
>>>>
>>