Opened on Oct 19, 2012 at 9:55:43 AM
Closed on Oct 20, 2012 at 6:39:51 AM
Last modified on Oct 22, 2012 at 9:01:47 AM
#2273 closed Bug (No Bug)
Long strings are cropped at hypen or whitespace in edit controls
| Reported by: | 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)
by , on Oct 19, 2012 at 10:06:10 AM
| Attachment: | GUICtrlSetData_Bug.au3 added |
|---|
follow-up: 3 comment:1 by , on Oct 19, 2012 at 10:38:17 AM
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 by , on Oct 20, 2012 at 6:39:51 AM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
comment:3 by , on Oct 22, 2012 at 6:50:38 AM
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 by , on Oct 22, 2012 at 9:01:47 AM
Thanks,
Definitly we can improve that.

Full example for long strings getting cropped at hyphen.