Modify

#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)

GUICtrlSetData_Bug.au3 (1.5 KB ) - added by mwnn@… on Oct 19, 2012 at 10:06:10 AM.
Full example for long strings getting cropped at hyphen.

Download all attachments as: .zip

Change History (5)

by mwnn@…, on Oct 19, 2012 at 10:06:10 AM

Attachment: GUICtrlSetData_Bug.au3 added

Full example for long strings getting cropped at hyphen.

comment:1 by jchd, 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 J-Paul Mesnage, on Oct 20, 2012 at 6:39:51 AM

Resolution: No Bug
Status: newclosed

in reply to:  1 comment:3 by mwnn@…, 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 J-Paul Mesnage, on Oct 22, 2012 at 9:01:47 AM

Thanks,
Definitly we can improve that.

Version 0, edited on Oct 22, 2012 at 9:01:47 AM by J-Paul Mesnage (next)

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.