#2273 closed Bug (No Bug)
Long strings are cropped at hypen or whitespace in edit controls
Reported by: | mwnn@… | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.8.1 | Severity: | None |
Keywords: | Cc: |
Description
If a string contains a hyphen or whitespace and the string is longer than the width of an edit control, then this string gets cropped right after the hyphen or whitespace.
Here's a short example. A full example is attached.
$str = "C:\Temp\Outbox\AutoIt_GUICtrlSetData\AB123-4567CDExyF08.ini" $edit = GUICtrlCreateEdit("", 10, 10, 320, 19, $ES_READONLY + $ES_WANTRETURN) GUICtrlSetData($edit, $str)
The string will be displayed as:
+--------------------------------------------------------+ |C:\Temp\Outbox\AutoIt_GUICtrlSetData\AB123- | +--------------------------------------------------------+
although there is more free space left in the edit control.
Replacing the hyphen with an underscore is shown as:
+--------------------------------------------------------+ |C:\Temp\Outbox\AutoIt_GUICtrlSetData\AB123_4567CDExyF08.| +--------------------------------------------------------+
As you can see, the string is displayed until the end of the edit control in the 2nd working example.
Attachments (1)
Change History (5)
Changed 12 years ago by mwnn@…
comment:1 follow-up: ↓ 3 Changed 12 years ago by jchd
There is no bug here.
You create a multiline style edit control, feed it a long line candidate to line splitting (using hyphen or whitespace) but your control height is not large enough to display more than one line!
Make your edit control twice as high and you'll see the whole content of your input data, as expected.
This should have been posted to the Help forum, not here.
comment:2 Changed 12 years ago by Jpm
- Resolution set to No Bug
- Status changed from new to closed
comment:3 in reply to: ↑ 1 Changed 12 years ago by mwnn@…
Replying to jchd:
There is no bug here.
You create a multiline style edit control
If I read the help for the 'GUICtrlCreateEdit' there's no word about multiline edit, contrary to 'GUICtrlCreateInput'.
comment:4 Changed 12 years ago by Jpm
Thanks,
Definitly we can improve that.
In fact both take in account the multiline but perhaps a remarks must be added about the height.
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Full example for long strings getting cropped at hyphen.