# GH_ScriptEditor class

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

```cs
public class GH_ScriptEditor
```

## Constructors

- [GH_ScriptEditor](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/ctor.md): (2 overloads)

## Fields

- [CacheLimit](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/cachelimit.md): (static)
- [InstanceTable](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/instancetable.md): (static)

## Properties

- [AutoSolveEnabled](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/autosolveenabled.md): (static)
- [Cache_AppDataDirectory](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/cache-appdatadirectory.md): (static) Gets the directory in windows ApplicationData that contains the source code caches
- [CurrentPosition](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/currentposition.md): Gets the current caret position.
- [EditorFont](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/editorfont.md): Gets or sets the font to use for the editor
- [Language](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/language.md): Gets the language used in this Script editor.
- [Owner](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/owner.md)
- [Visible](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/visible.md)

## Methods

- [AddButton](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/addbutton.md): Adds another button to the toolbar. Buttons should be added before the form is shown.
- [AppendSourceCode](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/appendsourcecode.md)
- [CacheCurrentScript](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/cachecurrentscript.md): (obsolete)
- [CacheCurrentScriptAsync](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/cachecurrentscriptasync.md)
- [CenterFormOnCursor](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/centerformoncursor.md)
- [Close](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/close.md)
- [CodeEditor_TextChanged](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/codeeditor-textchanged.md)
- [CompileTimerTick](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/compiletimertick.md)
- [DefaultAssemblies](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/defaultassemblies.md): (static, obsolete) Get a list of all the assemblies that are included by default for Scripts. This list excludes mscorlib.dll as that one is considered non-omittable.
- [DefaultAssemblyLocations](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/defaultassemblylocations.md): (static) Get a list of all the assembly locations that are included by default for Scripts.
- [FindScriptEditor](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/findscripteditor.md): (static) Find the editor that is already associated with an object.
- [FocusOnSource](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/focusonsource.md): Collapses all code blocks except the one containing the mutable sections.
- [GetAllCacheFiles](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/getallcachefiles.md): (static) Gets a collection of all the cache files.
- [GetSourceCode](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/getsourcecode.md): (obsolete)
- [GetSourceCodeAsync](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/getsourcecodeasync.md)
- [Initialize](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/initialize.md)
- [RegisterAssemblies](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/registerassemblies.md)
- [RestoreScriptCache](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/restorescriptcache.md)
- [SetCurrentPosition](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/setcurrentposition.md): Set the current caret position.
- [SetSourceCode](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/setsourcecode.md)
- [Show](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/show.md): (2 overloads)

## Events

- [Closed](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/closed.md)
- [CompileCodeRequest](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/compilecoderequest.md)
- [HandleDestroyed](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/handledestroyed.md)
- [SourceCodeChanged](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.script.gh-scripteditor/sourcecodechanged.md)
