Shapes are resizing when I use NFlowLayout


Author
Message
Todd Kemmerling
Todd Kemmerling
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)
Group: Forum Members
Posts: 1, Visits: 1

My shapes are resizing to the vertical size of the largest shape in the row. I have confirmed this by reducing the size of the largest shape and the smaller shapes track to this new size. Is this behavior controllable? If so how? Here is the code I am using for layout.

Thanks,

TK

NFlowLayout layout = new NFlowLayout();

layout.Resolution = nDrawingDocumentMain.Resolution;

layout.MeasurementUnit = nDrawingDocumentMain.MeasurementUnit;

layout.Direction = LayoutDirection.LeftToRight;

layout.HorizontalSpacing = 100f;

layout.VerticalSpacing = 100f;

NNodeList shapes = nDrawingDocumentMain.ActiveLayer.Children(NFilters.Shape2D);

layout.Layout(shapes, new NDrawingLayoutContext(nDrawingDocumentMain));


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi,

You can control the horizontal and vertical placement of the shapes within the slot the flow layout gives them by using the HorizontalContentPlacemnt and the VerticalContentPlacement properties of the flow layout. And if you wnat you can do even more - you can also set the placement of each shape individually by using the same properties of the shape's LayoutData and also setting the UseDefaultHorizontalContentPlacement and UseDefaultVerticalContentPlacement properties to false.



Best Regards,
Nevron Support Team


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search