Bug 4469 - Inconsistencies between single line Text and RichText widgets (1FK1RRM)
Summary: Inconsistencies between single line Text and RichText widgets (1FK1RRM)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 2.0   Edit
Hardware: All Windows NT
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Mike Wilson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-11 14:17 EDT by Mike Wilson CLA
Modified: 2002-05-23 14:15 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Wilson CLA 2001-10-11 14:17:19 EDT
RJS (10/15/99 2:16:55 PM)

	Execute the following code for a RichText widget,
	only 4 characters are returned by get text

	Shell shell = new Shell();
	RichText rText = new RichText(shell, SWT.SINGLE);
	rText.setText("0123"+ RichText.DELIMITER+"4567890");
	System.out.println(rText.getText());
	System.out.println(String.valueOf(rText.getText().length()));
	shell.dispose();

	Execute the following code for a Text widget,
	13 characters are returned including the delimiter

	Shell shell = new Shell();
	Text rText = new Text(shell, SWT.SINGLE);
	rText.setText("0123"+ Text.DELIMITER+"4567890");
	System.out.println(rText.getText());
	System.out.println(String.valueOf(rText.getText().length()));
	shell.dispose();

NOTES:

	KH (10/18/99 12:02:04 PM)
		Pls find out why this is happening. 
	KC (10/18/99 2:28:22 PM)
		This is an invalid test case.  If the style for rText is set to SWT.MULTI, then it returns as expected.
		Single line Text or RichText shouldn't contain multiple lines.
		Maybe there should be a exception when the code tries to do this.

	KH (10/22/99 3:55:19 PM)
		No the test case is valid. Both widgets are set to SWT.SINGLE. The problem is that when 
	you put multiple lines of text in them they return different results. 

	McQ (2/1/01 2:11:08 PM) -
		Putting multiple lines of text into a text widget which has been marked
		SINGLE is an undefined state. Application error. McQ to update comment
		in doc.
Comment 1 DJ Houghton CLA 2001-10-29 16:15:43 EST
PRODUCT VERSION:
	SWT 0.31

Comment 2 Mike Wilson CLA 2002-05-23 14:15:07 EDT
Comment has been updated.