Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

Setting TabContainer Height according to highest TabPanel

$
0
0

Hi all,

   I'm having a TabContainer with TabPanels which can gow repectively, according to their specific content.

   I whish to force the TabContainer Height to be fixed to the Height of the highest TabPanel (so it won't grow / shrink according to current selected Tab, on tabChange event).

   I've tried (in code behind Page_Load event) :

            AjaxControlToolkit.TabContainer container = (AjaxControlToolkit.TabContainer)Tabs;
            Unit minheight = 100;
            foreach (object obj in container.Controls)
            {
                if (obj is AjaxControlToolkit.TabPanel)
                {
                    AjaxControlToolkit.TabPanel tabPanel = (AjaxControlToolkit.TabPanel)obj;
                    if (tabPanel.Height.Value > minheight.Value)
                    {
                        minheight = tabPanel.Height;
                    }
                }
            }
            container.Height = minheight;



   but it's not working (probably since my tabs doesn't have any height specified, logically !) .

   Any ideas ?

Thanks in advance

Nicolas


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>