[Gambas-user] last line of editor

Benoit Minisini gambas at ...1...
Thu Dec 18 23:00:41 CET 2008


On jeudi 18 décembre 2008, Demosthenes Koptsis wrote:
> Actually this was my thought, to put this statement in SUB Editor_Change()
>
> but it doesnot work, that's why i ask you...what am i doing wrong?
>
> my code is
>
> PBLIC SUB edtSQL_Change()
>
> edtSQL.Goto(edtSQL.Lines.Count, 0)
>
> END
>

Moving the cursor during a Change event is risky, as you don't know if the 
editor will move the cursor again after the event.

> but when i change editors text with edtSQL.text="somethiing" does not
> go to last line
>

Setting the Text property changes the text, raises the Change event, and the 
moves the cursor to the top. So if you want to put it at the end, you must 
use the Goto() method just after.

Regards,

-- 
Benoit Minisini




More information about the User mailing list