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 94543 - Inconsistency in right-click selection behaviour
Summary: Inconsistency in right-click selection behaviour
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-05 22:38 UTC by ahristov
Modified: 2007-07-19 11:18 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ahristov 2007-02-05 22:38:46 UTC
Currently, right-clicking on a component that it inside a selected component
does nothing, but IMHO the selection should change to the nested component.
The current behaviour is inconsistent because if the parent was not selected,
the selection DOES change to the nested component (and not to the parent).

To be more specific, let's say there are two panels P1 and P2 (neither being
inside the other) and one button B inside P1.

Select P2. Right click on B -> Selection changes to B (ok)
Select P2. Left click on B -> Selection changes to B (ok)
Select P1. Left click on B -> Selection changes to B (ok)
Select P1. Right click on B -> Selection does NOT change (P1 remains selected)
Comment 1 Tomas Pavek 2007-02-06 18:21:31 UTC
We can consider it... But the current behavior is intentional. It is 
consistent in that right-click does not change the selection if there is 
already something selected under mouse cursor. The main reason is that 
sometimes a subcomponent may occuppy the whole container, or it is not easy to 
select it - in which case it would hard/impossible to right-click the 
container. You can use TAB or Alt+Left click to select a component that can't 
be easily selected directly - then you might not want to change the selection 
by right click.

Maybe we could detect those hard cases and let the righ-click selected the 
deepest component otherwise, whic I agree is more intuitive.
Comment 2 ahristov 2007-02-06 18:41:27 UTC
I think that you should consider also the frequency at which scenarios arise,
and decide on that basis. 

A general and counter-intuitive (imho) inconsistency exists so that a very very
specific situation can be covered:
- A container with a single, completely covering component
- The container is ALREADY selected somehow (either by Alt+click or using the
bean  inspector)
- In this situation, the user wants to act on the container rather than on the
component inside.

I don't believe the above use case is so frequent as to justify the overall
operation of the right click. IMHO it's much more frequent to right click on
something in order to bring its context menu.
Comment 3 Tomas Pavek 2007-07-19 11:18:37 UTC
Fixed as suggested (together with issue 93049). Right click now selects like left click.