igiCreateCodeEditor

Makes a code editor: a text box for code with syntax colouring, line numbers, undo and the usual editing keys. Returns an editor handle.

IGI

Parameters & Returns

Parameters

This function takes no parameters.

Returns

Int

Quick Summary

Makes a code editor: a text box for code with syntax colouring, line numbers, undo and the usual editing keys. Returns an editor handle.

Technical Exegesis...

Makes a code editor: a text box for code with syntax colouring, line numbers, undo and the usual editing keys. It keeps its own text, so make it once (in Main) and draw it with igiCodeEditor every frame.

This can be called any time, in Main or in the loop. The .lang file format is on its own page. See the IGI guide.

Returns: An editor handle.

Example

Example.bam
Global editor:Int = igiCreateCodeEditor()
igiCodeEditorSetLanguage(editor, igiLoadLanguage("Media/bamboobasic.lang"))
igiCodeEditorSetText(editor, "Print " & Chr(34) & "Hello" & Chr(34))