Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac: Problem with TabControl and multiline tabs #38

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

Mac: Problem with TabControl and multiline tabs #38

evgeny-k opened this issue Jun 26, 2012 · 3 comments
Labels

Comments

@evgeny-k
Copy link

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);
            };            
        }

    }
}
@evgeny-k
Copy link
Author

@cwensley
Copy link
Member

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

@cwensley
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants