|
|
|
|
Re: How to add Table column header mouse listener? [message #446372 is a reply to message #446370] |
Tue, 23 November 2004 22:47 |
Bianca Jiang Messages: 5 Registered: July 2009 |
Junior Member |
|
|
no, on wondows xp... can't get any mouse events on column header... any
ideas?
-B
Benjamin Pasero wrote:
> Bianca wrote:
>> Thanks for the reply. Unfortunately, SelectionListener doesn't work for
>> mouse right click which should bring up the context menu.
> Hi Bianca,
> are you running SWT on Mac? As far as I know, on Mac no event is fired
> when selecting the TableHeader.
> Regards,
> Ben
>>
>> -B
>>
>> Alejandro Narancio wrote:
>>
>>> Hi, you can handle the mouse event with se addSelectionListener method:
>>
>>
>>> TableColumn column = new TableColumn(.......);
>>> column.addSelectionListener(new SelectionListener() {
>>> public void widgetSelected(SelectionEvent e) {
>>> System.out.println("The user press on the header
>>> of the column");
>>> }
>>
>>
>>> public void widgetDefaultSelected(SelectionEvent e) {
>>> }
>>> });
>>
>>
>>> Regards, and i hope it help,
>>
>>
>>
>>> Alejandro
>>
>>
>>> Bianca wrote:
>>
>>
>>>> I need to add context menus on my table column headers on mouse
>>>> right click but wasn't successful. I tried the following but my
>>>> listener doesn't get any of the mouse events:
>>
>>
>>>> tableColumn.addListener(SWT.MouseUp, myListener);
>>
>>
>>>> Any help?
>>
>>
>>>> Thanks!
>>>> Bianca
>>
>>
>>
|
|
|
Re: How to add Table column header mouse listener? [message #446385 is a reply to message #446372] |
Wed, 24 November 2004 09:05 |
Benjamin Pasero Messages: 337 Registered: July 2009 |
Senior Member |
|
|
Bianca wrote:
> no, on wondows xp... can't get any mouse events on column header...
> any ideas?
Hm, well I am too not able to add a listener that reacts on a
mouse-click performed with the right-mouse button. But a
SelectionListener reacts when the left mouse button is pressed.
Ben
>
> -B
>
> Benjamin Pasero wrote:
>
>> Bianca wrote:
>>
>>> Thanks for the reply. Unfortunately, SelectionListener doesn't work
>>> for mouse right click which should bring up the context menu.
>
>
>> Hi Bianca,
>> are you running SWT on Mac? As far as I know, on Mac no event is fired
>> when selecting the TableHeader.
>
>
>> Regards,
>> Ben
>
>
>>>
>>> -B
>>>
>>> Alejandro Narancio wrote:
>>>
>>>> Hi, you can handle the mouse event with se addSelectionListener method:
>>>
>>>
>>>
>>>> TableColumn column = new TableColumn(.......);
>>>> column.addSelectionListener(new SelectionListener() {
>>>> public void widgetSelected(SelectionEvent e) {
>>>> System.out.println("The user press on the header
>>>> of the column");
>>>> }
>>>
>>>
>>>
>>>> public void widgetDefaultSelected(SelectionEvent e) {
>>>> }
>>>> });
>>>
>>>
>>>
>>>> Regards, and i hope it help,
>>>
>>>
>>>
>>>
>>>> Alejandro
>>>
>>>
>>>
>>>> Bianca wrote:
>>>
>>>
>>>
>>>>> I need to add context menus on my table column headers on mouse
>>>>> right click but wasn't successful. I tried the following but my
>>>>> listener doesn't get any of the mouse events:
>>>
>>>
>>>
>>>>> tableColumn.addListener(SWT.MouseUp, myListener);
>>>
>>>
>>>
>>>>> Any help?
>>>
>>>
>>>
>>>>> Thanks!
>>>>> Bianca
>>>
>>>
>>>
>>>
>
>
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05308 seconds