Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Mouse box inside graph box

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Created:
Dec 28, 2017 7:41 AM
| Last Modified: Dec 28, 2017 7:41 AM
(4073 views)

Is there a way to put a mouse box inside a graph box? Specifically around stuff like rect(). I'm making shapes that I want to give tool tips and click functionality.

Vince Faller - Predictum

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

No, graphs do not use any display box children that might get attached to them. You can put the mousebox around the graph. You'll get to write similar JSL to support the clicks in the mousebox or using the MouseTrap mechanism Jim pointed out. In either case you get a coordinate and have to decide what item was clicked. There is a point-in-polygon function if you have shapes that are not round or square.

Craige

2 REPLIES 2

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Mouse box inside graph box

Are either of these examples from the Scripting Index, what you are looking for?

```
Names Default To Here( 1 );
New Window( "Example",
exx = 20,
exy = 50;
Graph Box(
Frame Size( 200, 200 ),
Mousetrap(
exx = x;
exy = y;
);
Circle(
{0, 0},
Sqrt( exx * exx + exy * exy )
);
);
);
```

```
Names Default To Here( 1 );
New Window( "Example",
exx = 20,
exy = 50;
Graph Box(
Frame Size( 200, 200 ),
Mousetrap(
exx = x;
exy = y;
);
Circle(
{0, 0},
Sqrt( exx * exx + exy * exy )
);
);
);
```

Jim

Highlighted

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

No, graphs do not use any display box children that might get attached to them. You can put the mousebox around the graph. You'll get to write similar JSL to support the clicks in the mousebox or using the MouseTrap mechanism Jim pointed out. In either case you get a coordinate and have to decide what item was clicked. There is a point-in-polygon function if you have shapes that are not round or square.

Craige

Article Labels

There are no labels assigned to this post.