Bug 219139 - API to add resize grip / grow box in lower right corner of shell
Summary: API to add resize grip / grow box in lower right corner of shell
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 109885 (view as bug list)
Depends on:
Blocks: 219334
  Show dependency tree
 
Reported: 2008-02-15 13:58 EST by Markus Keller CLA
Modified: 2019-09-06 16:16 EDT (History)
4 users (show)

See Also:


Attachments
Hacked rich hover with resize grip (1.97 KB, image/png)
2008-02-15 13:58 EST, Markus Keller CLA
no flags Details
SnippetGrip.java (1.51 KB, text/plain)
2008-02-22 14:35 EST, Markus Keller CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-02-15 13:58:58 EST
Created attachment 89870 [details]
Hacked rich hover with resize grip

API request: Allow users of Shell to add a resize grip (a.k.a. grow box, resize control) in the lower right corner. See the attached screenshot for how it should look like.

I noticed that WinXP automatically adds such a grip when a Scrollable is placed in the lower right corner. So I tried to just put a Composite at that spot:
	Composite resizer= new Composite(bars, SWT.H_SCROLL | SWT.V_SCROLL);
	gd= new GridData(SWT.END, SWT.END, false, false);
	gd.widthHint= 0;
	gd.heightHint= 0;
	resizer.setLayoutData(gd);

That worked (the resize cursor appeared on the whole composite and dragging from there indeed resized the shell), but unfortunately, the whole area was full of cheese, like in bug 28132.

For the screenshot, I've set
	gd.heightHint= 1;
but that left me with a 1-pixel-high horizontal line above the grip.

However, it looks like there's a better way to add the resize grip: Wordpad, MSpaint, IE7, and the Windows Explorer all manage to get it without cheese.
Comment 1 Steve Northover CLA 2008-02-22 12:42:52 EST
When you get the latest, is it still covered with cheese?
Comment 2 Markus Keller CLA 2008-02-22 14:35:43 EST
Created attachment 90507 [details]
SnippetGrip.java

> When you get the latest, is it still covered with cheese?

Yes, however it's already cheese initially (unlike bug 28132, which I only saw after resizing or moving another window over the scrollbar junction).
Comment 3 Steve Northover CLA 2008-02-26 13:13:12 EST
Should no longer be cheesy.  Try it.

Back to the original bug.  I'm toying with the idea that if you place a label in the corner of a resizable shell, then the label should draw the resize grippers and let you resize.  It seems strange creating a composite that has scroll bars, then resizing it so that the scroll bars aren't showing in order to get a gripper.  Maybe Label should support SWT.RESIZE which means, "draw a gripper"?
Comment 4 Markus Keller CLA 2008-02-26 14:34:44 EST
Yummy, works like a charm on WinXP.

Turning a Label with SWT.RESIZE into a gripper would definitely look less hacky. I guess this will only work in the SE corner. What would it do in other locations?
Would this also work under GTK in an ON_TOP | RESIZE shell (despite bug 23980)?
Comment 5 Steve Northover CLA 2008-06-04 18:20:30 EDT
*** Bug 109885 has been marked as a duplicate of this bug. ***
Comment 6 Eclipse Webmaster CLA 2019-09-06 16:16:51 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.