TabPanel : Badge and UI

  1. #1

    TabPanel : Badge and UI

    Hi,
    I noticed an inexpected behavior for TabPanel:

    - One is a bug : UI does not work on it.
    - The other issue is maybe not a bug but i believe an inexpected behavior : when puting a panel inside a tabPanel, i would expect the badge to be on the tab.

    Click image for larger version. 

Name:	Capture.png 
Views:	52 
Size:	9.3 KB 
ID:	8301

    TabPanel tabPanHisto = new TabPanel() { Border = true, Flex = 1, ID = "tabpanelHistorique" + idcounter };
                Ext.Net.Panel pan = new Ext.Net.Panel()
                {
                    Title = "MDX",
                    AutoScroll = true,
                    Flex = 1,
                    Layout = "FitLayout",
                    UI = UI.Primary
                };
    
                TextArea txt = new TextArea() { Flex = 1, Text = "demo text"};
                pan.Items.Add(txt);
                Badge ba = new Badge() { Text = "Debug...", Scale = ButtonScale.Small };
                pan.Plugins.Add(ba);
                tabPanHisto.Items.Add(pan);
    Have a nice day!
  2. #2
    UI and Badge should be used on TabConfig
    <ext:Panel runat="server" Title='UI="Primary"'>
                        <TabConfig runat="server" UI="Primary">
                            <Plugins>
                                <ext:Badge runat="server" Text="1" />
                            </Plugins>
                        </TabConfig>
                    </ext:Panel>
    UI is demonstrated in the following sample
    https://examples2.ext.net/#/Miscellaneous/UI/TabPanel/
  3. #3
    Hi Vladimir,
    Thank you for your answer.
    Sorry, my mistake.

    Anyway, i'll post the "code behind answer" here if it can help someone :).

     TabPanel tabPanHisto = new TabPanel() { Border = true, Flex = 1, ID = "tabpanelHistorique" + idcounter, Title = "Evolution" };
                Ext.Net.Panel pan = new Ext.Net.Panel()
                {
                    Title = "MDX",
                    AutoScroll = true,
                    Flex = 1,
                    Layout = "FitLayout"
                };
            
                TextArea txt = new TextArea() { Flex = 1, Text = "demo text"};
                pan.Items.Add(txt);
                Badge ba = new Badge() { Text = "Debug...", Scale = ButtonScale.Small };
                pan.TabConfig = new Button() { UI = UI.Primary };
                pan.TabConfig.Plugins.Add(ba);
                tabPanHisto.Items.Add(pan);

Similar Threads

  1. [CLOSED] Setting Badge from server
    By cwolcott in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 23, 2014, 2:52 AM
  2. [CLOSED] Updating content in tabpanel causes tabpanel to redraw incorectly
    By taylorjp2000 in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Sep 26, 2012, 2:06 PM
  3. [CLOSED] Ext.Net's tabpanel and ExtJs tabpanel anchor
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 21, 2011, 11:57 AM
  4. Replies: 3
    Last Post: Aug 21, 2009, 2:24 PM
  5. [CLOSED] Tabpanel in tabpanel from code behind
    By Jurke in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 29, 2008, 7:56 AM

Posting Permissions