Issue about use of Button within a Tab

  1. #1

    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";
    }
    }
    }
  2. #2

    RE: Issue about use of Button within a Tab



    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...=1010-4-1.aspx, although that might only apply to v0.6.

    Hope this helps.
    Geoffrey McGill
    Founder & CEO

Similar Threads

  1. [CLOSED] Ie7 / 8 button submit issue
    By drgw74 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Apr 11, 2012, 10:25 AM
  2. [CLOSED] Button Render issue
    By rnachman in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Aug 11, 2011, 11:36 AM
  3. Button Disable/Enable issue
    By paddy in forum 1.x Help
    Replies: 3
    Last Post: Jul 26, 2011, 8:28 AM
  4. Replies: 1
    Last Post: Jul 15, 2011, 12:40 AM
  5. [CLOSED] Button width issue
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 18, 2010, 4:40 PM

Posting Permissions