Ejemplo n.º 1
0
        /// -----------------------------------------------------------------------------
        /// <summary>
        /// This class allows us to render the design time mode with custom HTML
        /// </summary>
        /// <remarks>
        /// The reason for implementing this class is to allow a default tabstrip to be
        /// shown at design-time, when no tabs are present in the html
        /// </remarks>
        /// <history>
        ///     [Jon Henning]	8/7/2006	Commented
        /// </history>
        /// -----------------------------------------------------------------------------
        public override string GetDesignTimeHtml()
        {
            string                strText;
            DNNTabStrip           objTabStrip = (DNNTabStrip)base.Component;
            TabStripTabCollection objTabs     = objTabStrip.Tabs;
            bool blnFDL = objTabStrip.ForceDownLevel;

            //store original before setting to true
            objTabStrip.ForceDownLevel = true;
            //force downlevel to cause only one tab to render
            if (objTabs.Count == 0)
            {
                objTabs.Add(new DNNTab("Tab 1"));
                objTabs.Add(new DNNTab("Tab 2"));
                Panel objPanel = new Panel();
                objPanel.Width  = new Unit("100px");
                objPanel.Height = new Unit("50px");
                ((DNNTab)objTabs[0]).Controls.Add(objPanel);
                objTabStrip.SelectedIndex = 0;
                strText = base.GetDesignTimeHtml();
                objTabs.Clear();
            }
            else
            {
                strText = base.GetDesignTimeHtml();
            }
            objTabStrip.ForceDownLevel = blnFDL;
            //restore original value
            return(strText);
        }
Ejemplo n.º 2
0
 /// -----------------------------------------------------------------------------
 /// <summary>
 /// Allows tab to be assigned a parent.
 /// </summary>
 /// <value></value>
 /// <remarks>
 /// Needed for callback scenerios where the tab is passed as a parameter
 /// </remarks>
 /// <history>
 ///     [Jon Henning]	8/7/2006	Commented
 /// </history>
 /// -----------------------------------------------------------------------------
 internal void SetParent(DNNTabStrip Parent)
 {
     m_oParentTabStrip = Parent;
 }
Ejemplo n.º 3
0
 // Methods
 internal TabStripTabCollection(DNNTabStrip owner)
 {
     this.owner = owner;
 }