Home > Archive > Clarion > July 2006 > Trapping mouse clicks
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Trapping mouse clicks
|
|
| C.Joseph Drayton 2006-07-04, 6:01 pm |
| Hi All,
I am trying to set some events on a browse. I want to do different
things depending on whether there is a single or double click.
I have set an alert on the browse for MouseLeft and MouseLeft2 in
the embed for the alert, I am using the following code;
[color=darkred]
case KeyCode()
of MouseLeft
oRTF_RTFTextBox.LoadField(dcmn:DocText)
display(?RTFTextBox)
of MouseLeft2
DoUpdate = 1
TestFile = clip(dcmn:DocLocation) & '' & |
clip(dcmn:DocName)
MSWord3.OpenDoc(TestFile,False)
return(DoUpdate)
end
[color=darkred]
When I execute the file, if I single click, it always does the
MouseLeft2 case. What is even weirder than that, is that it does it
wrong. What I mean, is that it loads word but not the document. I
know the code works, because if I rem out everything else and just
use those two lines to call Word, it works perfectly.
So I guess I have two questions, 1) How do I trap a single-click and
a double-click 2) how do I make the call to Word work inside of the
case of statement.
Thanks,
C.Joseph
| |
| Robert Peros 2006-07-05, 3:55 am |
| "C.Joseph Drayton" <csdcs@tlerma.com> wrote in message
> I am trying to set some events on a browse. I want to do different
> things depending on whether there is a single or double click.
> I have set an alert on the browse for MouseLeft and MouseLeft2 in
> the embed for the alert, I am using the following code;
<cut>
> TestFile = clip(dcmn:DocLocation) & '' & clip(dcmn:DocName)
> MSWord3.OpenDoc(TestFile,False)
> So I guess I have two questions, 1) How do I trap a single-click and
Are you add MouseLeft to the list of Alert keys for the control ?
> a double-click 2) how do I make the call to Word work inside of the
> case of statement.
I don't know for sure,but what is "False" ->visible.?
Are TestFile var valid?
R.
| |
| C.Joseph Drayton 2006-07-05, 7:55 am |
| Robert Peros wrote:
> "C.Joseph Drayton" <csdcs@tlerma.com> wrote in message
> <cut>
> Are you add MouseLeft to the list of Alert keys for the control ?
>
>
> I don't know for sure,but what is "False" ->visible.?
> Are TestFile var valid?
>
Yes the variables and constants are correct. If I just run those two
commands, they execute properly.
> R.
|
|
|
|
|