# GH_Layout class

Namespace: [Grasshopper.GUI.Ribbon](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.gui.ribbon.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_Layout : GH_ISerializable
```

Represents a complete ribbon layout.

## Constructors

- [GH_Layout](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/ctor.md): (2 overloads) Create a new Ribbon layout

## Properties

- [FilePath](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/filepath.md): Gets or sets the file path of the custom layout. Typically the path should only be set during Save operations. The FilePath field is not included in (de)serialization.
- [ItemCount](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/itemcount.md): Gets the total number of Items defined in this layout.
- [Items](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/items.md): Gets an enumerator for all the items in this layout.
- [Name](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/name.md): Gets the name of the layout as indicated by the filepath or "unnamed"
- [PanelCount](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/panelcount.md): Gets the total number of Panels defined in this layout.
- [TabCount](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/tabcount.md): Gets the total number of Tabs defined in this layout.
- [Tabs](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/tabs.md): Gets the internal list of ribbon tab names. Eventhough items define tabs, this separate list is required in order to specify the order of tabs.

## Methods

- [AddItem](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/additem.md): (3 overloads) Add a new item to this layout.
- [AddTab](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/addtab.md): (2 overloads) Add a new tab to this layout. The tab will receive a default name.
- [Deserialize](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/deserialize.md): Deserialize this layout from a *.ghlayout file. If this function returns False, the state of this object is undefined.
- [FindTab](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/findtab.md): Find the first tab which matches the given name.
- [Read](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/read.md)
- [Serialize](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/serialize.md): (2 overloads) Serialize this layout to a *.ghlayout file.
- [StringSort](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/stringsort.md): (static) For: RH-83156. Specifically handle leading whitespace for sorting purposes.
- [Write](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.ribbon.gh-layout/write.md)
