Hello.
I `ve started studiing PB a month ago (when the visual programing cource was started). I am writting a program that solves quadratic equation.
My program should control user`s input (user can input only numbers).
I use CONTROL GET TEXT to get the text from the control. Then I check it for non-number characters (when %EN_CHANGE takes place) and delete wrong characters. And if something was changed in the text (with my check procedure) i replece the text in the textbox with the correct one using CONTROL SET TEXT. And here is a probem:
The carriage in the textbox is MOVED TO THE START of the text every time I use CONTROL SET TEXT. In my opinion, this thing not handy for a user. So I want to know how can I set carriage position and get it.
(I see the problem solution in saving the current position of the carriage and its restoring after the text is changed(with CONTROL SET TEXT)).
(If your know the way to change the text in the text box, that does not change the carriage position, please, also tell me).
I `ve started studiing PB a month ago (when the visual programing cource was started). I am writting a program that solves quadratic equation.
My program should control user`s input (user can input only numbers).
I use CONTROL GET TEXT to get the text from the control. Then I check it for non-number characters (when %EN_CHANGE takes place) and delete wrong characters. And if something was changed in the text (with my check procedure) i replece the text in the textbox with the correct one using CONTROL SET TEXT. And here is a probem:
The carriage in the textbox is MOVED TO THE START of the text every time I use CONTROL SET TEXT. In my opinion, this thing not handy for a user. So I want to know how can I set carriage position and get it.
(I see the problem solution in saving the current position of the carriage and its restoring after the text is changed(with CONTROL SET TEXT)).
(If your know the way to change the text in the text box, that does not change the carriage position, please, also tell me).
Comment