This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197672 - Cannot move a Container because sub-container is selected instead
Summary: Cannot move a Container because sub-container is selected instead
Status: RESOLVED DUPLICATE of bug 174495
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: issues@guibuilder
URL: http://kenai.com/projects/icontrol/do...
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 16:48 UTC by K__P
Modified: 2012-12-03 18:34 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description K__P 2011-04-12 16:48:35 UTC
Hi - in GUI builder I try to drag and drop a container (a panel in GridBagLayout containing other panels in GridBagLayout) to a different place (e.g. from the left side of a SplitPane to the right side), but after selecting the top container each time I try to move it, the selection "jumps" to the inner sub-container which is not what I want. So I don't see how I can ever move the top container.

Product Version = NetBeans IDE 7.0 RC1 (Build 201103280000)
Operating System = Mac OS X version 10.6.7 running on x86_64
Java; VM; Vendor = 1.6.0_24
Runtime = Java HotSpot(TM) 64-Bit Server VM 19.1-b02-334
Comment 1 Tomas Pavek 2011-04-13 08:43:20 UTC
True this is hard to do in the designer. But note you can do it in the Inspector tree - either drag the corresponding node directly, or use cut/paste.
Comment 2 unai 2012-10-01 21:56:07 UTC
Still true for NB 7.2.

It's very frustrating not being able to move a container around just because (being a container) it contains other components. Even if you select the container, when you start dragging in order to move it around, the inner component gets selected instead, and you end up moving around the content...
Comment 3 Tomas Pavek 2012-10-03 12:47:38 UTC
This applies to the case the container is all covered by sub-components so there is no place where to click (and drag) just the container itself.

True it should be fixed somehow, but note there is a workaround, although quite awkward:
1) Select a component in the container you want to move.
2) Press and hold ALT and then drag the component. The mouse press with ALT will select the parent so the drag gesture then applies to the container. Once moving, release the ALT key.
Comment 4 unai 2012-10-03 13:23:21 UTC
(In reply to comment #3)
> This applies to the case the container is all covered by sub-components so
> there is no place where to click (and drag) just the container itself.
> 
> True it should be fixed somehow, but note there is a workaround, although quite
> awkward:
> 1) Select a component in the container you want to move.
> 2) Press and hold ALT and then drag the component. The mouse press with ALT
> will select the parent so the drag gesture then applies to the container. Once
> moving, release the ALT key.

Matisse, however, doesn't snap what you're ALT-dragging to edges / preferred distances / etc.

Only workaround I found is the following:

- Select (in the inspector tree) BOTH the container and the contained component (CTRL+click); you can now move around the container, in the Matisse WYSISYG designer, and keep the snapping functionality.
Comment 5 Tomas Pavek 2012-10-03 13:28:46 UTC
> Matisse, however, doesn't snap what you're ALT-dragging to edges / preferred
> distances / etc.

As I wrote, the ALT key is just to _start_ dragging the parent, once moving, you can release it.
Comment 6 unai 2012-10-03 13:31:15 UTC
(In reply to comment #5)
> > Matisse, however, doesn't snap what you're ALT-dragging to edges / preferred
> > distances / etc.
> 
> As I wrote, the ALT key is just to _start_ dragging the parent, once moving,
> you can release it.

You're right: I was keeping ALT pressed. Upon releasing it I get normal behaviour.
Thanks for your suggestion
Comment 7 Tomas Pavek 2012-12-03 18:34:24 UTC

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