Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 519103

Summary: [win32] Combo#LIMIT too high compared to what user can practically set.
Product: [Eclipse Project] Platform Reporter: Etienne Reichenbach <etienner>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: loskutov, niraj.modi, susann.hauenstein
Version: 4.7Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Etienne Reichenbach CLA 2017-07-03 08:16:00 EDT
When I create a org.eclipse.swt.widgets.Combo and set a text with length > 6551 then the combo is not showing any content.

Looking at the code in org.eclipse.swt.widgets.Combo.setText(String) there seems to be a LIMIT variable that should hold the operating system limit for the number of characters, which in my case is 0x7FFFFFFF (2147483647).
Comment 1 Etienne Reichenbach CLA 2017-07-03 08:23:22 EDT
Note that the value returned by OS.SendMessage (hwndText, OS.EM_GETLIMITTEXT, 0, 0) is 30000 still much bigger than the limit I of 6551 I found empirically...
Comment 2 Niraj Modi CLA 2017-07-05 04:11:29 EDT
Yes, I could reproduce this issue on Win7.
Looks like the practical text-limit much lower then the value returned by Combo#getTextLimit() which returns 30,000 characters.

This needs further investigation on how to specify proper Combo#LIMIT value.
Comment 3 Susann Hauenstein CLA 2017-11-17 07:18:46 EST
This is the same issue as reported in bug 370948.
Comment 4 Andrey Loskutov CLA 2017-11-17 07:34:59 EST

*** This bug has been marked as a duplicate of bug 370948 ***