コード例 #1
0
        public override void Initialize()
        {
            base.Initialize();

            m_XPBackgroundCheck.Checked = nTabControl1.DrawThemeBackground;

            m_TabStyleCombo.FillFromEnum(typeof(TabStyle), false);
            m_TabStyleCombo.SelectedItem = TabStyle.Standard;

            m_TabAlignCombo.FillFromEnum(typeof(TabAlign), false);
            m_TabAlignCombo.SelectedItem = TabAlign.Top;

            m_TextOrientationCombo.FillFromEnum(typeof(TextOrientation), false);
            m_TextOrientationCombo.SelectedItem = TextOrientation.Automatic;

            m_DefRenderer    = new NTabControlRenderer(nTabControl1);
            m_CustomRenderer = new NCustomTabControlRenderer(nTabControl1);

            NListBoxItem item;

            item      = new NListBoxItem(m_DefRenderer);
            item.Text = "Default Renderer";
            m_RenderersCombo.Items.Add(item);

            item      = new NListBoxItem(m_CustomRenderer);
            item.Text = "Custom Renderer";
            m_RenderersCombo.Items.Add(item);
            m_RenderersCombo.SelectedIndex = 0;

            //nTabPage1.Text = "Long text tab page";
            nTabControl1.HasClose = true;
        }
コード例 #2
0
 private void m_RenderersCombo_SelectedIndexChanged(object sender, System.EventArgs e)
 {
     if (m_RenderersCombo.Items.Count == 0)
     {
         return;
     }
     try
     {
         NTabControlRenderer r = m_RenderersCombo.SelectedItem as NTabControlRenderer;
         if (r != null && r != nTabControl1.Renderer)
         {
             nTabControl1.Renderer = r;
         }
     }
     catch
     {
     }
 }