You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When moving and resizing a control in a pixelLayout, control "NSTrackingArea" should be updated
Actual Behavior
NSTracking Area is only updated the first time the control is sized or moved. Any later move or resize will never update tracking area. So mouseover and other mouse events doesn't fire correctly (i.e. AS the tracking area does not reflect control size)
Steps to Reproduce the Problem
See the bunch of code below. Each time I call the show method, I compute random location and size for Button control (to make it simpler).
First time the method is called, everything is OK because NSTracking area is correctly initialized with the size of the button control.
Any further calls will resize et re-position buttons control => NStracking area is still seated to the first size of button control and is never updated. So some controls have bad area to track mouse move/enter/leave.
Code that Demonstrates the Problem
public class CRadialControl : PixelLayout
{
...
public void show(int startAngle = 0)
{
Visible = true;
var currX = 50; // Start of random X
for (var i = 0; i < 8; i++)
{
var _graphicsPath = new GraphicsPath();
var sectorDrawer = new ArcSectorDrawer();
// Will compute size and location of controls
var size = new Size(new Random().Next(50, 90), new Random().Next(50, 90));
var location = new Point(new Random().Next(currX, currX+90), (level + 1) * 200);
currX += 100+size.Width;
// Get the control by Index in dictionary property
var ctrl = layoutBtns.ElementAt(i).Key;
// Move and resize control in pixel layout
Move(ctrl, location.X, location.Y);
ctrl.Size = size;
}
}
Specifications
Version: 2.8.0.0 (Provided by McNeel Rhinoceros)
Platform(s): macOS
Operating System(s): macOS 15.1
The text was updated successfully, but these errors were encountered:
FYI, I found what's is wrong, and potentially a bug.
As soon as the control (i.e. In my case the pixelLayout control) is set to Visible=false somewhere in the code, when I change size of container (PixelLayout) controls, NSTrackingArea is never updated (the location is OK, and the Size property of ETO Objects are right too)
As a workaround, I don't use Visible property but use native "AlphaValue" to hide PixelLayout object.
Hey @yd021976, thanks for reporting the issue. Do you have some details of when you set PixelLayout.Visible=false? Do you set it to false, update positions of things, then set Visible = true?
A more complete sample might help shed some light on how to reproduce this on my end. Thanks!
Hi ! My bad, I was sure I updates the exemple code . Anyway, I reproduced the bug with and without « visible » property. As soon as you randomly resize a control, the tracking are ends up to not be updated.
If I have time, I’ll update the example code to reproduce.
Thank you !
Expected Behavior
When moving and resizing a control in a pixelLayout, control "NSTrackingArea" should be updated
Actual Behavior
NSTracking Area is only updated the first time the control is sized or moved. Any later move or resize will never update tracking area. So mouseover and other mouse events doesn't fire correctly (i.e. AS the tracking area does not reflect control size)
Steps to Reproduce the Problem
See the bunch of code below. Each time I call the show method, I compute random location and size for Button control (to make it simpler).
First time the method is called, everything is OK because NSTracking area is correctly initialized with the size of the button control.
Any further calls will resize et re-position buttons control => NStracking area is still seated to the first size of button control and is never updated. So some controls have bad area to track mouse move/enter/leave.
Code that Demonstrates the Problem
Specifications
The text was updated successfully, but these errors were encountered: