Right Mouse Click in RunRev
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 87
- Joined: Thu Jul 17, 2008 8:42 pm
Right Mouse Click in RunRev
Hi,
As a beginner, I've been searching for how to code a right mouse click for a Windows project, but haven't found it. I am guessing it has to do with handlers and somehow passing a code to activate right click, but this is where I get lost.
(In the project, the user inserts text entry fields to type text into. I need to code this to make the text entry fields draggable on mouse down. Problem is that text entry fields have a flashing cursor for text entry so mouse down is already in use. The only solution I can think of is to use a right click for enabling drag/drop for text entry fields? The project is more fully described in posting: http://forums.runrev.com/phpBB2/viewtopic.php?p=14399 )
Any leads would be greatly appreciated.
Kind Regards,
As a beginner, I've been searching for how to code a right mouse click for a Windows project, but haven't found it. I am guessing it has to do with handlers and somehow passing a code to activate right click, but this is where I get lost.
(In the project, the user inserts text entry fields to type text into. I need to code this to make the text entry fields draggable on mouse down. Problem is that text entry fields have a flashing cursor for text entry so mouse down is already in use. The only solution I can think of is to use a right click for enabling drag/drop for text entry fields? The project is more fully described in posting: http://forums.runrev.com/phpBB2/viewtopic.php?p=14399 )
Any leads would be greatly appreciated.
Kind Regards,
saratogacoach
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770
-
- Posts: 87
- Joined: Thu Jul 17, 2008 8:42 pm
Thanks, grc.
I gave this a try, but could not get it to work:
By the way, is there a drag command that could be used?
or
Is there a way to select the text entry fields, then drag them?
Kind Regards,
I gave this a try, but could not get it to work:
Code: Select all
set the script of the templatefield to "on mouseDoubleDown" & CR & "grab me" & CR & " end mouseDoubleDown"
or
Is there a way to select the text entry fields, then drag them?
Kind Regards,
saratogacoach
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770
Saratoga,
that is a little tricky since an editable field does not get mouseDown, mouseUp etc. A locked field does though.
For a locked field you could say as in the images
for an editable field you could put something into the script of the field like this:The optionkey is the Alt-key on windows. That is not as smooth as the grab but gets you there.
BTW regarding right click: whenever you do a handler like
you have a parameter passed to the mouseUp that indicates the type of click
documentation:
regards
Bernd
P.S. Do you have an example site on the web that shows the kind of genogram you have in mind?
that is a little tricky since an editable field does not get mouseDown, mouseUp etc. A locked field does though.
For a locked field you could say as in the images
Code: Select all
on mouseDown
grab me
end mouseDown
Code: Select all
on mousewithin
if the optionkey is down then
set the loc of me to the mouseloc
end if
end mousewithin
BTW regarding right click: whenever you do a handler like
Code: Select all
on mouseUp
dosomething
end mouseUp
documentation:
soThe mouseButtonNumber specifies which mouse button was pressed:
* 1 is the mouse button on Mac OS systems and the left button on Windows and Unix systems.
* 2 is the middle button on Unix systems.
* 3 is the right button on Windows and Unix systems and Control-click on Mac OS systems.
Code: Select all
on mouseUp mouseButtonNumber
if mouseButtonNumber = 1 then do leftclickstuff
if mouseButtonNumber = 3 then do rightclickingstuff
end mouseUp
Bernd
P.S. Do you have an example site on the web that shows the kind of genogram you have in mind?
-
- Posts: 87
- Joined: Thu Jul 17, 2008 8:42 pm
Hi Bernd,
Thanks for your continued help.
I kept working on a solution to dragging the text entry field, until, while experimenting, I noticed that these fields, using the code:
will drag using right mouse down (in Windows).
No explanation, but it works. (Perhaps others can try it out, test this.) But, I think this is solved.
Now, I need to add line drawing: the user needs to be able to draw connecting lines (for example, solid, straight lines) between images (images are used as symbols for family members).
These inserted lines will also need to have handles on their ends, so the user can grab a handle and lengthen or shorten or rotate a line to fit between images/symbols. Plus ability to grab and drag the line wherever needed. Similar to inserted images and inserted text entry fields, inserted lines need to be named and have incrementing (+1) numbering (so each line that is created will have a unique name).
I've created a new posting for help with line drawing:
http://forums.runrev.com/phpBB2/viewtop ... 4427#14427
Examples of pedigrees and genograms
I uploaded an illustration (png file) which gives an example of a (fictional) family pedigree which could be drawn to track health conditions.
http://www.elearningprojects.com/Pedigree2.png
Genograms are a little different: they use a variety of different connecting lines, in addition to solid lines, like dotted, arrow-headed, etc. (about 12-15 different types). These genogram lines are used to symbolize different types of reltaionships between family members.
Here's an example of a genogram with a few of the family members having labels for (fictional) names:
http://www.elearningprojects.com/genogram2.png
Again, thanks.
Thanks for your continued help.
I kept working on a solution to dragging the text entry field, until, while experimenting, I noticed that these fields, using the code:
Code: Select all
set the script of the templatefield to "on mouseDown" & CR & " grab me" & CR & "end mouseDown"
No explanation, but it works. (Perhaps others can try it out, test this.) But, I think this is solved.
Now, I need to add line drawing: the user needs to be able to draw connecting lines (for example, solid, straight lines) between images (images are used as symbols for family members).
These inserted lines will also need to have handles on their ends, so the user can grab a handle and lengthen or shorten or rotate a line to fit between images/symbols. Plus ability to grab and drag the line wherever needed. Similar to inserted images and inserted text entry fields, inserted lines need to be named and have incrementing (+1) numbering (so each line that is created will have a unique name).
I've created a new posting for help with line drawing:
http://forums.runrev.com/phpBB2/viewtop ... 4427#14427
Examples of pedigrees and genograms
I uploaded an illustration (png file) which gives an example of a (fictional) family pedigree which could be drawn to track health conditions.
http://www.elearningprojects.com/Pedigree2.png
Genograms are a little different: they use a variety of different connecting lines, in addition to solid lines, like dotted, arrow-headed, etc. (about 12-15 different types). These genogram lines are used to symbolize different types of reltaionships between family members.
Here's an example of a genogram with a few of the family members having labels for (fictional) names:
http://www.elearningprojects.com/genogram2.png
Again, thanks.
saratogacoach
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770
LiveCode 4.6.0, Windows 7 Home Premium 64 bit, Core i7 2.80, 8G RAM, ATI Radeon HD5770