Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Tue Dec 12, 2017 1:08 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Help with Secondary Mouse Click on Track Pad
PostPosted: Mon Jun 03, 2013 7:02 pm 
Offline

Joined: Tue Mar 05, 2013 2:33 pm
Posts: 64
Location: Greensboro, North Carolina
I thought this would have been the right code to allow my "secondary click" (two finger click) on my MBP track pad. Please point me into the right direction as this works when you press/hold control then single click.

Thanks in advance!

Dim base as new MenuItem
Dim ZoomSubMenu as new MenuItem("Zoom")
Dim hitItem as new MenuItem


If IsContextualClick then

if ContextualOverImage Then //Only allow if over a Node Image

if Keyboard.AsyncControlKey or Keyboard.ControlKey then

ZoomSubMenu.Append( New MenuItem("Zoom 275%"))
ZoomSubMenu.Append( New MenuItem("Zoom 250%"))
ZoomSubMenu.Append( New MenuItem("Zoom 225%"))
ZoomSubMenu.Append( New MenuItem("Zoom 200%"))
ZoomSubMenu.Append( New MenuItem("Zoom 175%"))
ZoomSubMenu.Append( New MenuItem("Zoom 150%"))
ZoomSubMenu.Append( New MenuItem("Zoom 125%"))
ZoomSubMenu.Append( New MenuItem("Zoom 100%"))
ZoomSubMenu.Append( New MenuItem("Zoom 75%"))
ZoomSubMenu.Append( New MenuItem("Zoom 50%"))
ZoomSubMenu.Append( New MenuItem("Zoom 25%"))
base.Append(ZoomSubMenu)

base.append(New MenuItem(MenuItem.TextSeparator))

base.append(New MenuItem("Bring to Front"))
base.append(New MenuItem("Send to Back"))

base.append(New MenuItem(MenuItem.TextSeparator))
base.append(New MenuItem("Delete Node"))

hitItem = base.PopUp(X,Y)

if hitItem <> nil then
if hitItem.Text = "Delete Node" then
Me.mRemoveObject(Me.SelectedObject)

elseif hitItem.Text = "Zoom 275%" then
// 275% Zoom
me.mObjectZoom(2.75)

elseif hitItem.Text = "Zoom 250%" then
// 250% Zoom
me.mObjectZoom(2.5)

elseif hitItem.Text = "Zoom 225%" then
// 225% Zoom
me.mObjectZoom(2.25)

elseif hitItem.Text = "Zoom 200%" then
// 200% Zoom
me.mObjectZoom(2.0)

elseif hitItem.Text = "Zoom 175%" then
// 175% Zoom
me.mObjectZoom(1.75)

elseif hitItem.Text = "Zoom 150%" then
// 150% Zoom
me.mObjectZoom(1.5)

elseif hitItem.Text = "Zoom 125%" then
// 125% Zoom
me.mObjectZoom(1.25)

elseif hitItem.Text = "Zoom 100%" then
// 100% Zoom
me.mObjectZoom(1.0)

elseif hitItem.text = "Zoom 75%" then
// 75% Zoom
me.mObjectZoom(.75)

elseif hitItem.Text = "Zoom 50%" then
// 50% Zoom
me.mObjectZoom(.5)

elseif hitItem.Text = "Zoom 25%" then
// 25% Zoom
me.mObjectZoom(.25)

elseif hitItem.Text = "Bring to Front" then
// Enable Bring to Front
mNodeBringToFront

elseif hitItem.Text = "Send to Back" then
// Enable Bring to Front
mNodeSendToBack
end if
end if

End If
end if

ContextualOverImage = False

else

end if

_________________
Mike Cotrone - CCIE #8411 R&S, CCIE #8411 Voice
Chief Technology Officer
Onepath Systems, LLC


Real Studio 2012 R2.1 Enterprise, Mac OS, Windows, Ubuntu Linux


Top
 Profile  
Reply with quote  
 Post subject: Re: Help with Secondary Mouse Click on Track Pad
PostPosted: Mon Jun 03, 2013 10:49 pm 
Offline
User avatar

Joined: Sun Aug 05, 2007 10:46 am
Posts: 4931
Location: San Diego, CA
[cpde]
If IsContextualClick then

if ContextualOverImage Then //Only allow if over a Node Image

if Keyboard.AsyncControlKey or Keyboard.ControlKey then
[/code]

IsContexutalClick is true is the RIGHT mousebutton is clicked (if you have a two button mouse) -OR-
if the Command Key (OSX) / Ctrl Key (WIN) is held down while the LEFT mousebutton is clicked

Checking for Keyboard actions is superflous and may be contributiing to you problem
That is ASSUMING your OverImage flag is being controlled properly (ie.. is true)

_________________
Dave Sisemore
iMac I7[2012], OSX Mountain Lion 10.8.3 RB2012r2.1
Note : I am not interested in any solutions that involve custom Plug-ins of any kind


Top
 Profile  
Reply with quote  
 Post subject: Re: Help with Secondary Mouse Click on Track Pad
PostPosted: Mon Jun 03, 2013 11:53 pm 
Offline

Joined: Mon Aug 15, 2011 10:25 pm
Posts: 293
He was asking how come it does not work with the two finger tap multi-gesture on the track pad..

_________________
Real Studio 2012r1.1 | MacBook Pro i5, 10.6.8 | Windows 7


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group