# FloatingButtonCollection class

Namespace: [Grasshopper2.UI.Flex](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.flex.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public sealed class FloatingButtonCollection
```

Utility class for storing and maintaining collections of floating buttons. You don't technically need this class but it's a lot easier than doing all the maintenance/bookkeeping yourself.

## Properties

- [Buttons](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/buttons.md): Enumerate over all active buttons.
- [Control](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/control.md): Gets the control associated with this collection.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/count.md): Gets the number of floating buttons in this collection.
- [Names](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/names.md): Enumerate over all button names. This method ignores those buttons which are in states [FloatingState.Closing](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingstate.md) or [FloatingState.Closed](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingstate.md).
- [VisibleButtons](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/visiblebuttons.md): Enumerate over all visible buttons.

## Indexers

- [this[]](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/item.md): Gets a specific button by name. This accessor will throw if the name is not recognized.

## Methods

- [Add](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/add.md): Add a fixed button to this collection.
- [AddAnchored](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/addanchored.md): Add an anchored button to this collection.
- [Close](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/close.md): Close some specific buttons. This will also remove the button from this collection.
- [CloseAll](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/closeall.md): Close all remaining buttons.
- [FindByName](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/findbyname.md): Try and retrieve a specific button by name.
- [FindByPoint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/findbypoint.md): Try and retrieve a button underneath a specific point.
- [Hide](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/hide.md): Hide some specific buttons.
- [IsDefined](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/isdefined.md): Gets whether a specific name has been defined.
- [ModifyAnchor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/modifyanchor.md): Assign a new anchor to a button.
- [ModifyColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/modifycolour.md): Assign a new colour to a button.
- [ModifyIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/modifyicon.md): Assign a new icon to a button.
- [ModifyInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/modifyinfo.md): Change the Info field on a button.
- [Show](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/show.md): Show some specific buttons.
- [StateCount](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbuttoncollection/statecount.md): Count the number of buttons in a specific state.
