View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001492 | JEDI VCL | 00 JVCL Components | public | 2004-03-18 09:56 | 2004-03-20 01:33 |
Reporter | vlads | Assigned To | user72 | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0001492: TJvTrayIcon to distinguish single-click and a double-click | ||||
Description | Double-clicking the right mouse button actually generates four messages: WM_RBUTTONDOWN, WM_RBUTTONUP, WM_RBUTTONDBLCLK, and WM_RBUTTONUP again. Solution: Create a timer which is started on the first click, set the timeout value to something a bit longer than the double-click, then connect the timeout() signal to a slot of your own. When a double click event is received you simply stop the timer. If the custom slot is visited you know that a single click was done. | ||||
Additional Information | This is my implementation comments with { Vlad S} | ||||
Tags | No tags attached. | ||||
2004-03-18 09:56
|
JvTrayIcon_diff.zip (33,306 bytes) |
|
This is the same behavior as single/dblclick with the left button, isn't it? I don't really like changing the default Windows behavior, especially not using a timer... Comments? |
|
You could consider a tray icon as a non default windows item. That is, I know tray icons that respond both to, and differently to, single and double clicks. Another issue is that you get the following events while double-clicking a tray icon: OnClick, OnDblClick, OnClick. Normally you would get: OnClick, OnDblClick. edited on: 03-18-04 15:04 edited on: 03-18-04 15:04 |
|
>Another issue is that you get the >following events while double-clicking a tray icon: So are you really saying that we should have a timer for left click/dblclick as well? |
|
>So are you really saying that we should have a timer for left click/dblclick as well? It is ugly, but *if* you want to make a distinction between single and double clicks, then there is no other way (that I know). Maybe make it an option <g>. But the second thing is a bug: If you double-click the trayicon, two click events are fired (and one double click event). |
|
Fortunately, Vlad's fix works for all buttons. I'll add it, then |
|
There are an option to improve my fix. Timer should start at first mouse click (Mouse Down) because this is when System timer for dbl click starts. |
|
Done |
|
Updated in CVS |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-03-18 09:56 | vlads | New Issue | |
2004-03-18 09:56 | vlads | File Added: JvTrayIcon_diff.zip | |
2004-03-18 14:23 |
|
Note Added: 0003384 | |
2004-03-18 14:23 |
|
Assigned To | => user72 |
2004-03-18 14:23 |
|
Status | new => feedback |
2004-03-18 15:03 | remkobonte | Note Added: 0003385 | |
2004-03-18 15:04 | remkobonte | Note Edited: 0003385 | |
2004-03-18 15:04 | remkobonte | Note Edited: 0003385 | |
2004-03-18 15:24 |
|
Note Added: 0003387 | |
2004-03-18 15:50 | remkobonte | Note Added: 0003388 | |
2004-03-19 00:54 |
|
Note Added: 0003389 | |
2004-03-19 06:44 | vlads | Note Added: 0003391 | |
2004-03-19 07:56 |
|
Note Added: 0003393 | |
2004-03-20 01:33 |
|
Status | feedback => resolved |
2004-03-20 01:33 |
|
Resolution | open => fixed |
2004-03-20 01:33 |
|
Note Added: 0003402 |