Im trying to find out how to both get and set text in a textview. Im a beginner with both rust and gtk-rs. im using gtk3 bc my distro doesnt have a gtk4 pkg yet.
I want to get/set the text from a textview using functions, for use by other parts of an app.
Ive seen from GtkEntry, that it uses .text() and .set_text(), but textview is different.
Can anyone help, point out examples, or docs that explain how to do it?
Ive looked thru the docs and examples for gtk-rs but all i can find is demo examples that print the text from inside the click-connect. I havent been able work out the steps to get from that, to the functions i want.
I read that i need to get the textbuffer that the textview displays, and use that to get and set the text - but i cant find a single example that shows how to actually do it.
with some guessing i got as far as textview.buffer().text() but the red squiggle says trait bounds are not satisfied, and now im stuck. and i havent started on setting yet.
i expect the gtk-rs docs to provide such examples, but i cant find them.
Thanks for any help.