Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > change the color of Groupname in panel control

Reply
Thread Tools

change the color of Groupname in panel control

 
 
kaushik
Guest
Posts: n/a
 
      09-24-2008
hi there,
i am not able to change the color of Groupname in panel control from
blue to black. I read somewhere, if i set the forecolour of the panel, both
the groupingtext and text
are rendered the same colour but how to turn this from blue to black..

can anybody show me with codes
thanks in advance.


 
Reply With Quote
 
 
 
 
Norm
Guest
Posts: n/a
 
      09-25-2008
On Sep 23, 8:07*pm, "kaushik" <kaush...@metalogicsystems.com> wrote:
> hi there,
> i am not able to change the color of Groupname in panel control from
> blue to black. I read somewhere, if i set the forecolour of the panel, both
> the groupingtext and text
> are rendered the same colour but how to turn this from blue to black..
>
> can anybody show me with codes
> thanks in advance.


I ran a quick test on this issue. It seems that IE (I am running IE 8
Beta 2) does not allow the "color" style to cascade into the Grouping
Text. It work in Firefox and Chrome for me. It helps to understand how
the GroupingText property renders into HTML. When you set the property
the Panel renders differently. Below is an example:

<div id="Panel1" style="color:Blue;">
<fieldset>
<legend> Grouping Text</legend>
Inner text
</fieldset>
</div>

This exact code renders "Grouping Text" as blue in Firefox and Chrome,
but not in IE. Therefore, the style does not cascade into the Legend
tag. ;( My solution to this in a similar case is to just use a css
class: (In the other case, I wanted the colors to be different, they
are the same here)

....
<style type="text/css">
/*This will set the style to both the "div" element and the "legend"
element*/
.GroupPanel, .GroupPanel Fieldset Legend
{
color: Blue;
}
</style>
....
<div id="Panel1" class="GroupPanel">
<fieldset>
<legend>Grouping Text</legend>
Inner text
</fieldset>
</div>

This solution worked in all 3 browsers for me.
Happy coding!

Norm
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Java Control Panel in START menu->Control Panel: Diff javacpl.cpl and javacpl.exe? Robin Wenger Java 0 08-18-2011 06:38 AM
Why is there no "Java Control Panel" for J2EE v5upd14 ? Reinstall Java Control Panel possible? Ulf Meinhardt Java 0 07-07-2009 08:38 AM
change the color of Groupname in panel control kaushik ASP .Net Building Controls 0 09-23-2008 11:44 AM
styling the GroupName in asp:Panel Sridhar Chinta ASP .Net 1 06-28-2006 11:49 PM
GroupName in RadioButton Server Control Sundar ASP .Net 0 12-09-2003 10:57 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57