GUI with Text editor

Hi all,
I am working on a GUI and trying to connect the slider to the text editor.
Any suggestions how can I do it?