Showing posts with label style. Show all posts
Showing posts with label style. Show all posts

Wednesday, March 28, 2012

Changing CSS or STYLE of TabContainer and TabPanes

Hi to all...

I have a question and i need answersSmile

I have a AJAX tabContainer witch add tabPanes dynamicly, but now i want to change the style or CSS of her, but i cant...

Can anyone help me!?

Hi Rikardo,

Here is a sample which indicates how to add css to the newly added Panel. If it is not you really want , please feel free to let me know with more explanations.

TabPanel myNewTab = new TabPanel();
myNewTab.ID = "TabPanel3";
myNewTab.HeaderText = "TabPanel3";
myNewTab.CssClass ="the tab css style";
Button myButton = new Button();
myButton.ID = "myButton";
myNewTab.Controls.Add(myButton);
this.TabContainer1.Tabs.Add(myNewTab);

I hope this help.

Best regards,

Jonathan


Jonathan Shen – MSFT:

Hi Rikardo,

Here is a sample which indicates how to add css to the newly added Panel. If it is not you really want , please feel free to let me know with more explanations.

TabPanel myNewTab = new TabPanel();
myNewTab.ID = "TabPanel3";
myNewTab.HeaderText = "TabPanel3";
myNewTab.CssClass ="the tab css style";
Button myButton = new Button();
myButton.ID = "myButton";
myNewTab.Controls.Add(myButton);
this.TabContainer1.Tabs.Add(myNewTab);

I hope this help.

Best regards,

Jonathan

In addition to the above

Just be careful when you are naming the css classes! There seems to be a bug in the tab panes extender, where strange things happen if you change the defaults css names.

follow this linkhttp://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=11238 to Codeplex for comments and workarounds for this bug.

Good luck

Monday, March 26, 2012

Change AutoCompleteExtender style/skin

How can I change the style of an AutoCompleteExtender based on skins?Hi,

I think you can't change the style of the completion list because it's hard-coded in the AutoCompleteBehvior class.

Change a textbox style property on failed validation

Can someone point me in the right direction for implementing a textbox that has it's border changed when a RequiredFieldValidator fails? Ideally this would be using either an extender or the control toolkit.

Thanks.

Hi,

The easiest way would be using CustomerValidator control, then add javascript function to change the style if validation fails.
Hope this helps.


Thanks, I ended up using a validator extender that styles the textbox if the validation fails.


Thats nice...Smile

CCS getting lost while doing partial rendering with update panel......

hi !!

Problem :: CSS style lost when upatepanel does Partial Rendering..

I have made one navigation menu in javascript.. And i have onmouseover and onmouseout script...

In this script i m chaning the font and background image of <td>

The code is like this :

<tdid="menuid1" class="menuFont"onmouseover="show_popup(1)"onmouseout="javascript:m_show=0;">

<aid="mlink1" class="menuLink"href="#">Link1</a>

</td>

And the style is like bolow...

<styletype="text/css">

.menuFont1{font-size:11px;background:url(jsInclude/images/menu/nav_off_bg.gif)repeat-x;style=CURSOR:pointer;COLOR:#000000;FONT-FAMILY:Tahoma,Verdana,Arial,Helvetica,ans-serif;TEXT-ALIGN:center;TEXT-DECORATION:none}

.menuLink {color:#666666;TEXT-DECORATION:none;font-weight:bold}

.submenuLink{COLOR:#FFFFFF;TEXT-DECORATION:none}

.submenuFont{font-size:11px;COLOR:#ffffff;FONT-FAMILY:Tahoma,Verdana,Arial,Helvetica,sans-serif;height:16px;background-COLOR:#7885FF;TEXT-ALIGN:left}

</style>

Now in my form i have one text box and on its text_changed event i m doing partial rendering with update panel...

But when the response comes..the CSS of menu got lost...

Can any one help me what is the reason for this?

There has to be a boat out on the horizon somewhere. ,