FlowLayoutWidget flow = new FlowLayoutWidget(); Button button1 = new Button("Button 1"); Button button2 = new Button("Button 2"); Button button3 = new Button("Button 3"); flow.AddChild(button1); flow.AddChild(button2); flow.AddChild(button3);
FlowLayoutWidget flow = new FlowLayoutWidget(FlowLayoutWidget.WrapDirection.Vertical); Label label1 = new Label("Label 1"); Label label2 = new Label("Label 2"); Label label3 = new Label("Label 3"); flow.AddChild(label1); flow.AddChild(label2); flow.AddChild(label3);In this example, three labels are created and added to the FlowLayoutWidget using the AddChild method. The FlowLayoutWidget is set to wrap in a vertical direction, so the labels will be arranged vertically within the widget. The package library is MatterHackers.Agg.UI.