[Gambas-user] New Editor Side Bar
Benoît Minisini
gambas at ...1...
Sun Dec 18 09:43:07 CET 2016
Le 18/12/2016 à 05:52, Tony Morehen a écrit :
> Fabian, it looks great and works like a charm.
>
> By the way, I'm working on text editor which would benefit from a couple
> of minor changes to the text editor component. Could you make
> $hDoc.Lines a read/write property of TextEditor and $hDoc.LineLength a
> read only property?
No need for that. Use TextEditor array accessor to access a specific line:
- "MyTextEditor[Line].Text" returns a the "Line" line.
- "MyTextEditor[Line].Length" returns the length of the "Line" line.
Beware that MyTextEditor[Line] returns a virtual temporary object. You
must not store it.
>
> I working on a search function. I can use Instr on TextEditor.Text to
> find the appropriate text
You must not use Instr(), it cannot handle UTF-8 text. Use
String.Instr() instead.
Regards,
--
Benoît Minisini
More information about the User
mailing list