Profile Picture

Shapes are resizing when I use NFlowLayout

Posted By Todd Kemmerling 13 Years Ago
Author
Message
Todd Kemmerling
Posted 13 Years Ago
View Quick Profile
Forum Newbie

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
Last Active: 13 Years Ago
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
Posted 13 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

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





Similar Topics


Reading This Topic