Notifications
Clear all
Bring objects to front/send to back
Analytica Q&A
3
Posts
2
Users
1
Reactions
1,840
Views
Mar 31, 2022 9:35 am
(@ftnsbonl38owc63xjps05ixlkbt2)
Active Member
Joined: 3 years ago
Hello,
How do I bring objects to front or send them to back programmatically?
Â
Thanks
Topic Tags
2 Replies
Admin
Apr 01, 2022 6:37 am
(@lchrisman)
Member
Joined: 14 years ago
The Front-to-back is determined by the z-order, which is stored in the NodeLocation attribute. It is an integer, and can be positive or negative. Nodes with larger Z-order display over nodes with lower Z-order. When you select "Bring to Front" on the right-mouse context menu, it sets the Z-order to a number that is larger than the other z-orders on the same diagram.
Here is a UDF to do it:
Function Send_to_front(o : Object)
Definition:
Local z := NodeLocation::z of Contains of isin of o; NodeLocation::z of o := Max([10,z+1])
Function Send_to_back(o : Object)
Local z := NodeLocation::z of Contains of isin of o; NodeLocation::z of o := Min([-10,z-1])
Â
Reply
Hadi Eshraghi reacted
1 Reply
Apr 04, 2022 9:27 am
Forum Information
- 4 Forums
- 87 Topics
- 286 Posts
- 1 Online
- 1,887 Members
Our newest member: xtw183872813
Forum Icons:
Forum contains no unread posts
Forum contains unread posts
Topic Icons:
Not Replied
Replied
Active
Hot
Sticky
Unapproved
Solved
Private
Closed