# FloatingButton 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 FloatingButton
```

Base class for button UI elements that float in screen-space on top of IControl.

## Properties

- [Anchor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/anchor.md): Gets the anchor position of this button. This property is only relevant if Position == Anchored.
- [Colour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/colour.md): Gets the colour of this button.
- [Control](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/control.md): Gets the control associated with this floating button.
- [Enabled](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/enabled.md): Gets the enabled state of this button.
- [HasFocus](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/hasfocus.md): Gets or sets whether this interaction object is currently active. Object are made active by the owner control if they return Response.Capture from any event handlers. Control are made inactive when they return Response.Release, or when another object becomes active. You typically do not set this property.
- [Icon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/icon.md): Gets or sets the icon associated with this button.
- [Info](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/info.md): Gets or sets the info message for this button.
- [Name](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/name.md): Gets or sets the name of this button.
- [NumericValue](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/numericvalue.md): Gets the numeric value (if any) associated with this button.
- [Position](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/position.md): Gets the position category for this button.
- [State](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/state.md): Gets the current state of this button.

## Methods

- [Close](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/close.md): Close the button.
- [Hide](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/hide.md): Hide the button.
- [MakeNumeric](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/makenumeric.md): Turn this button into a numeric slider.
- [ModifyAnchor](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/modifyanchor.md): Set a new anchor point. Handler is not required to modify the anchor animator in this case.
- [ModifyColour](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/modifycolour.md): Set a new colour.
- [Show](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/show.md): Show the button.

## Events

- [ValueChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.floatingbutton/valuechanged.md): Raised when the actual value of the associated number changes.
