[grid] Menu popup in void [message #49185] |
Fri, 08 February 2008 21:11  |
Eclipse User |
|
|
|
Hi,
I've got a context driven menu popup happening when a user right-clicks
a row in the grid. This is working fine.
Unfortunately, when the user right-clicks in a non-populated row (at the
bottom) I still get a menuDetected event when nothing is selected. As
such, the context code is wrong. I could detect this non-selection and
not display the menu, but in the case where a clicks a row first,
selecting it, and then right clicks into a void I'd prefer to still not
show a menu as it might be unclear that the menu selection relates to a
row selected much higher.
Does anyone know the correct way to determine a right-click in this void
area that would result in a menuDetected event - so that I can safely
ignore this event and not show a menu.
|
|
|
|
Re: [grid] Menu popup in void [message #49972 is a reply to message #49207] |
Wed, 27 February 2008 10:18  |
Eclipse User |
|
|
|
Hi Grant,
You should be able to use the x,y coordinates of the menu detect event
and ask Grid.getItem(x,y). If it returns null then you can assume its
not over a row.
regards,
-Chris
Grant Slender wrote:
> Is this question more suited to another newsgroup? platform.swt?
>
> Grant Slender wrote:
>> Hi,
>>
>> I've got a context driven menu popup happening when a user
>> right-clicks a row in the grid. This is working fine.
>>
>> Unfortunately, when the user right-clicks in a non-populated row (at
>> the bottom) I still get a menuDetected event when nothing is selected.
>> As such, the context code is wrong. I could detect this non-selection
>> and not display the menu, but in the case where a clicks a row first,
>> selecting it, and then right clicks into a void I'd prefer to still
>> not show a menu as it might be unclear that the menu selection relates
>> to a row selected much higher.
>>
>> Does anyone know the correct way to determine a right-click in this
>> void area that would result in a menuDetected event - so that I can
>> safely ignore this event and not show a menu.
|
|
|
Re: [grid] Menu popup in void [message #588542 is a reply to message #49185] |
Mon, 11 February 2008 17:04  |
Eclipse User |
|
|
|
Is this question more suited to another newsgroup? platform.swt?
Grant Slender wrote:
> Hi,
>
> I've got a context driven menu popup happening when a user right-clicks
> a row in the grid. This is working fine.
>
> Unfortunately, when the user right-clicks in a non-populated row (at the
> bottom) I still get a menuDetected event when nothing is selected. As
> such, the context code is wrong. I could detect this non-selection and
> not display the menu, but in the case where a clicks a row first,
> selecting it, and then right clicks into a void I'd prefer to still not
> show a menu as it might be unclear that the menu selection relates to a
> row selected much higher.
>
> Does anyone know the correct way to determine a right-click in this void
> area that would result in a menuDetected event - so that I can safely
> ignore this event and not show a menu.
|
|
|
Re: [grid] Menu popup in void [message #588769 is a reply to message #49207] |
Wed, 27 February 2008 10:18  |
Eclipse User |
|
|
|
Hi Grant,
You should be able to use the x,y coordinates of the menu detect event
and ask Grid.getItem(x,y). If it returns null then you can assume its
not over a row.
regards,
-Chris
Grant Slender wrote:
> Is this question more suited to another newsgroup? platform.swt?
>
> Grant Slender wrote:
>> Hi,
>>
>> I've got a context driven menu popup happening when a user
>> right-clicks a row in the grid. This is working fine.
>>
>> Unfortunately, when the user right-clicks in a non-populated row (at
>> the bottom) I still get a menuDetected event when nothing is selected.
>> As such, the context code is wrong. I could detect this non-selection
>> and not display the menu, but in the case where a clicks a row first,
>> selecting it, and then right clicks into a void I'd prefer to still
>> not show a menu as it might be unclear that the menu selection relates
>> to a row selected much higher.
>>
>> Does anyone know the correct way to determine a right-click in this
>> void area that would result in a menuDetected event - so that I can
>> safely ignore this event and not show a menu.
|
|
|
Powered by
FUDForum. Page generated in 0.03643 seconds