Mac: Problem with TabControl and multiline tabs #38

Closed
evgeny-k opened this Issue Jun 26, 2012 · 3 comments

Comments

Projects
None yet
2 participants

all tabs are put in one line


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Eto;
using Eto.Forms;
using Eto.Drawing;
using System.Threading;

namespace etotest
{
    class Program
    {
        [STAThread]
        static void Main(string[] args)
        {
            var generator = Generator.GetGenerator("Eto.Platform.Mac.Generator, Eto.Platform.Mac");

            var app = new TestApplication(generator);
            app.Run(args);
        }
    }

    public class TestApplication : Application
    {
        public TestApplication(Generator generator)
            : base(generator)
        {
            this.Name = "Test Application";
        }

        public override void OnInitialized(EventArgs e)
        {
            this.MainForm = new MainForm();
            HandleEvent(Application.TerminatingEvent);

            base.OnInitialized(e);

            // show the main form
            this.MainForm.Show();
        }

    }


    public class MainForm : Form
    {
        TabControl pg;


        public MainForm()
        {
            Size = new Size(900, 800);
            var lp = new Panel();
            this.AddDockedControl(lp, new Padding(5));
            var lPanelLayout = new TableLayout(lp, 1, 2);
            lPanelLayout.Padding = new Padding(0);

            pg = new TabControl();
            lPanelLayout.Add(pg, 0, 1, true, true);
            for (int i = 0; i < 20; i++) {
                var p = new TabPage();
                p.Text =  "page " + i.ToString();
                pg.TabPages.Add(p);
            };            
        }

    }
}
Owner

cwensley commented Jun 26, 2012

There is no mulit-line tab option in OS X unfortunately.

Owner

cwensley commented Dec 21, 2013

Closing this as there's now the ability to create themed controls, much like the themed tab control in Eto.Test

@cwensley cwensley closed this Dec 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment