#4094: FilePanel: File Name is Selected Back to Front
------------------------------------+---------------------------
Reporter: bonefish | Owner: axeld
Type: bug | Status: new
Priority: normal | Milestone: R1
Component: Applications/Tracker | Version: R1/pre-alpha1
Resolution: | Keywords:
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
------------------------------------+---------------------------
Comment (by pulkomandy):
I'm wondering how it works for other text fields.
The course of events is (for renaming a file in PoseView, at least):
1) The text view is created
2) The text is added to it using SetText. This moves the caret to position
0 (start of the text)
3) SelectAll is called. This does not affect the caret position.
There don't seem to be an API to control the caret?
I think InsertText instead of SetText will set the caret after the
inserted text. But it makes sense for SetText to set it to the beginning,
for example, when editing a file in StyledEdit, you normally want to read
from the start, not from the end of the file.
Maybe SetText should move the caret to the end and StyledEdit should be
the special case? Maybe it depends on wether this is a multi-line text
view or not?
--
Ticket URL: <https://dev.haiku-os.org/ticket/4094#comment:3>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.