| Summary: | Combo does not drop down when used as TreeEditor. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | G.W. van der Vegt <wvd_vegt> | ||||
| Component: | SWT | Assignee: | Bogdan Gheorghe <gheorghe> | ||||
| Status: | CLOSED DUPLICATE | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | billy.biggs, cocoakevin, snorthov, xixiyan | ||||
| Version: | 3.1 | Keywords: | triaged | ||||
| Target Milestone: | --- | ||||||
| Hardware: | All | ||||||
| OS: | Linux-GTK | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
G.W. van der Vegt
Can you provide a snippet that shows the problem? BB, have you seen this? Created attachment 22508 [details]
Combo & Text Height Bug when Editing a TreeItem
Hi,
I have not been able to test it on mac & os/x but it runs on win32 and contains
code directly taken from the application that i work on. Search for //* n *//
style comments to see where You can change a few things.
What happens is:
1) both the Text/Combo is smaller than the TreeItem and is shrinked on
Linux/GTK2 & Os/X but not on Win32 (at least the Combo isn't, can't remember
the Text Control). Technically on Win32 the Combo is centered above the Tree
Item's cell so when editing the top row the Combo clipped a bit too.
If that is corrected another bug surfaces:
2) on Linux/GTK2 there is no dropdown list visible (the Combo works only by
scrolling when using the cursor keys).
Can you show a screenshot of the Text being clipped on GTK+ or OS X? I can't reproduce that behaviour here. Apologies, this is trivially reproducable on OS X (but not on my GTK+ version). Regardless, it seems that the workaround of setting the minimumHeight to the size is the correct thing to do: the default is to set the size to the size of the item, and more space is required to fit the focus ring on OS X. So, this part is not a bug. The combo not appearing is reproducable for me on GTK+ and I am investigating. The problem is that the focus events for a Combo are being tracked on the text entry by SWT on both GTK+ and Motif. When the drop down appears, a FocusOut event is sent, which causes the Combo to be disposed. (In reply to comment #5) > The problem is that the focus events for a Combo are being tracked on the text > entry by SWT on both GTK+ and Motif. When the drop down appears, a FocusOut > event is sent, which causes the Combo to be disposed. Any (temporary) workarounds or must i wait for a new Build of Eclipse for this to be fixed? Fixing this will be difficult and I do not think we will be able to find a safe fix for 3.1. As a workaround in your code, you could not dispose the combo editor on FocusOut, and look for other events to track as appropriate for the application. I can reproduce the issue on SWT master as of today, GTK3.22. *** This bug has been marked as a duplicate of bug 344898 *** |