DieselMeister / Terminal.Gui.Elmish

An elmish wrapper around Miguel de Icaza's 'Gui.cs' https://github.com/migueldeicaza/gui.cs including a fable like view DSL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TabView Tabs

sheridanchris opened this issue · comments

Description

Defining individual tabs for a tab view doesn't seem to be implemented. I'd like to create a PR to implement this and am wondering what the API might look like.

I was thinking of something like this:

View.tabView [
  tabView.tabs [
    tabView.tab [
      tab.title "Tab 1"
      tab.view [
        View.label [ label.text "Hello, World!" ]
      ]
    ]
    tabView.tab [
      tab.title "Tab 2"
      tab.view [
        View.label [ label.text "Hello, World!" ]
      ]
    ]
  ]
]

I see that prop.ref exists to reference the TabView element directly and add tabs that way but I think a feliz-style definition would be quite nice to add.

Looks good! Thank you. :)

The api is not complete. I think I am missing also the proper implementation of the menu stuff. I am currently busy with work. So again thank you for doing this!