View Full Version : Issue about use of Button within a Tab

Sep 25, 2008, 1:51 PM
Added few Buttons in TabPanel->Tab->TableLayout->Cells, one button in each cell; tried to apply for a different color, back color, CssClass, CtCls, Cls or whatever to every button but nothing happens, the buttons look always the same. Moreover, neither the Button.ToolTip is shown at all. What's wrong with that?

by the way I hope you can post any documentation as soon as possible, or at least a bit more examples to clarify the use of such cool library

Riccardo Sarti

protected void Example()
Coolite.Ext.Web.TabPanel tabs = new Coolite.Ext.Web.TabPanel();
tabs.ResizeTabs = true;
tabs.BackColor = System.Drawing.Color.White;
tabs.Shadow = ShadowMode.Drop;
tabs.ForeColor = System.Drawing.Color.Black;
tabs.MinTabWidth = Unit.Pixel(115);
tabs.TabWidth = Unit.Pixel(135);
tabs.EnableTabScroll = true;
tabs.Width = Unit.Pixel(600);
tabs.Height = Unit.Pixel(50);
tabs.ActiveTab = 0;
tabs.BodyBorder = false;
tabs.Border = false;
tabs.LayoutOnTabChange = true;
for (int i = 1; i <= 5; i++)
Coolite.Ext.Web.Tab tab = new Coolite.Ext.Web.Tab();
tab.ID = "pmondo_" + i.ToString();
tab.Title = "mondo " + i.ToString();
tab.IconCls = "tabs";
tab.Closable = false;
tab.BodyStyle = "padding: 0px; vertical-align: top;";
Coolite.Ext.Web.Button btn;
Coolite.Ext.Web.Cell c;
Coolite.Ext.Web.TableLayout tl = new TableLayout();
tl.Columns = 3;

for (int j = 1; j <= 3; i++)
btn = new Coolite.Ext.Web.Button();
c = new Coolite.Ext.Web.Cell();
btn.Text = "ptipo_" + i.ToString() + "_" + j.ToString();
btn.ToolTip = "pmondo_" + i.ToString() + "_ptipo_" + j.ToString();
btn.ID = "pmondo_" + i.ToString() + "_ptipo_" + j.ToString();
btn.Visile = true;
btn.BackColor = System.Drawing.Color.Cyan;
btn.CssClass = "button";
btn.CtCls = "button";
btn.Cls = "button";

Sep 27, 2008, 4:37 PM
Hi Riccardo,

The BackColor, ForeColor and CssClass property do not get applied to the coolite toolkit controls. The properties were still exposed in the v0.5.x release, although in v0.6 they have been completely hidden.

The "CtCls" and "Cls" properties do get applied to the controls, although styling the <ext:Button> will be a bit of a challenge.

The "style" of the <ext:Button> is almost completely made up of images, so to change the color of the button, the images would need to changed.

If you are looking to uniquely identify several buttons, you might want to investigate a unique .Icon on each <ext:Button>.

The following forum post details setting the ToolTip, see http://forums.ext.net/showthread.php?threadid=1010-4-1.aspx, although that might only apply to v0.6.

Hope this helps.