1

I have a richtextbox binded to a bindingsource by this code ;

RTB.DataBindings.Add("text", BindingSource1, "Name", False)

Problem is, I need to leave and re-enter this richtextbox a lot of time. But every time I leave the textbox (IF I modified the text in it), and if the scroll bar weren't at the top, it scroll back to top. I suspect it is because of the databinding.

How can I do to stop this behaviour ? I understand than the datasource has to be updated (And I want it to be), but I don't understand why the text "reset".

Thx for your help.

Epervier 666
  • 97
  • 1
  • 8
  • http://stackoverflow.com/a/21443115/2882256 and http://stackoverflow.com/a/10238396/2882256 – Alex B. Jun 28 '16 at 13:35
  • I know how to keep track of selection/position... I suppose I can cheat by capturing position at leave, and putting back position on event textchanged (with a boolean to make sure of the leave). But I don't understand why the text reset (if that's what happen) and how to prevent it (if that's possible) – Epervier 666 Jun 28 '16 at 14:48

0 Answers0