CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

How to set position

by mka » 20 Jul 2015 18:17

Hello!
I have tried many different ways, but I can't find the right way to set the position.

function ($menu,x,y){
???????????
}
mka
 
Posts: 57
Joined: 02 Dec 2013 16:06

by Alexander Bulei » 20 Jul 2015 18:23

Hi mka,

Please explain better, what you want to do.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by mka » 20 Jul 2015 18:26

I just want to know the syntax. E.g. what should I write to get the context menu to popup at x: 200 and y: 350 ?
I couldn't find anythin about context menu's in the documentation either?
mka
 
Posts: 57
Joined: 02 Dec 2013 16:06

by mka » 20 Jul 2015 18:49

I want to fine-adjust the position so it always popup's underneath and with the left side aligned with the button's left edge.

contextmenu.png
You do not have the required permissions to view the files attached to this post.
mka
 
Posts: 57
Joined: 02 Dec 2013 16:06

by Alexander Bulei » 21 Jul 2015 10:51

Hi mka,

If you assign the OnPosition event, you should set the position of popup by yourself, and only by javascript, in other words, you should use OnPosition.Script property.

To set the position, you can use the Jquery UI Utility or javascript/jquery:

javascript code
$menu.$menu.css({top: 123, left: 123});}


Parameters X and Y = cursor/click point coordinates

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by mka » 21 Jul 2015 14:56

Thank you very much.
mka
 
Posts: 57
Joined: 02 Dec 2013 16:06


Return to JQContextMenu

Who is online

Users browsing this forum: No registered users and 3 guests

Contact Us.