Editor Plugin question: using IScriptEditor as a TextBox

Started by SupSuper, Mon 16/06/2008 18:43:23

Previous topic - Next topic

SupSuper

I created a IScriptEditor control through GUIController.CreateScriptEditor, but there isn't much I can do with it aside from placing it in my panel and changing its content. Is there any way to be able to get text selections and other user input from it, like a TextBox? I can't cast the control since it's a custom type.
Programmer looking for work

Pumaman

The IScriptEditor interface was added basically as a placeholder because I wasn't sure what people would want to do with it. Can you give a list of commands that you want to be able to perform on it?

SupSuper

Well currently I just need to get the position of the text cursor (SelectionStart, SelectedText, etc). Being able to access the text as lines (Lines property) or format bits of text might also be handy in the future.

While I'm at it, is there any way to take advantage of the script editor's auto-complete to automatically figure out what function/property/etc. the text cursor is on, or is it better if I code that on my own?
Programmer looking for work

Pumaman

Quote from: SupSuper on Tue 17/06/2008 17:54:43
Well currently I just need to get the position of the text cursor (SelectionStart, SelectedText, etc). Being able to access the text as lines (Lines property) or format bits of text might also be handy in the future.

Ok thanks, I'll look into those for the next version.

QuoteWhile I'm at it, is there any way to take advantage of the script editor's auto-complete to automatically figure out what function/property/etc. the text cursor is on, or is it better if I code that on my own?

I'll look into that as well.

SMF spam blocked by CleanTalk