Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content of text control should be selected at tabstop event. #19

Open
beru opened this issue May 5, 2015 · 5 comments
Open

Content of text control should be selected at tabstop event. #19

beru opened this issue May 5, 2015 · 5 comments

Comments

@beru
Copy link
Owner

beru commented May 5, 2015

No description provided.

@beru beru changed the title Content of control should be selected at tabstop event. Content of text control should be selected at tabstop event. May 5, 2015
@beru
Copy link
Owner Author

beru commented May 21, 2015

8899cc8
9fc7d3e
Added some workarounds for this issue.

@qPCR4vir
Copy link

Hi !
This is OK for one liner, but for multi liner (a text with many pages?) I will prefer to simple return where the caret was the last time. If I come with tab into the text (and select all the text) and begging to write all will be "lost".

@beru
Copy link
Owner Author

beru commented May 24, 2015

Hi, qPCR4vir. Thanks for the comment. I will follow your advice.

I've checked how tabstop on text input control behaves on several GUI enviroments.

Toolkit Single-line Multi-line
Standard Windows Controls (EDIT) Select all Select all
Google Chrome 42 Select all Deselect
Firefox 37 Select all Selection preserved
Internet Explorer 11 Select all Deselect

On web browsers, After the tabstop on single-line text input control, If I pressed left key, the caret moves to head of the content (most left position). and if I pressed right key, the caret goes to the end of the content (most right position).

On Windows with single-line EDIT control (of user32.dll), After the tabstop the content will be selected, and if I pressed left key, the caret moves to left of the last position, and if I pressed right key, the caret goes to the end.

@cnjinhao
Copy link

Hi, beru.
A new commit(569eb49) enhanced the focus handle, two new methods was added to determines the behavior of content selection.

textbox.focus_behavior(textbox::text_focus_behavior::select_if_tabstop_or_click);

//caret moves to the most left/right position when text is selected if true is passed,
//caret moves to the left or right of the last position if false is passed
textbox.select_behavior(true);

Any feedback is appreciated.

@beru
Copy link
Owner Author

beru commented Feb 29, 2016

Thank you for the notification, jinhao. I'll check the feature l8er.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants