Sep 25, 2008, 12:51 PM
Issue about use of Button within a Tab
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
regards
Riccardo Sarti
protected void Example()
{
Coolite.Ext.Web.TabPanel tabs = new Coolite.Ext.Web.TabPanel();
PH_Mappa.Controls.Add(tabs);
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();
tabs.Tabs.Add(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();
tab.ContentControls.Add(tl);
tl.Columns = 3;
for (int j = 1; j <= 3; i++)
{
btn = new Coolite.Ext.Web.Button();
c = new Coolite.Ext.Web.Cell();
tl.Cells.Add(c);
c.Items.Add(btn);
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";
}
}
}