private void InitAlignment() { AlignmentTestBlock = new UniversalBlock(); AlignmentTestBlock.HMembers.Children.Add("Layout test"); // configuration buttons Alignment = new ButtonBlock("Alignment: LeftOrTopEdge"); OrientationButton = new ButtonBlock("Orientation: Vertical"); Alignment.MyButton.Pushed += Alignment_Pushed; OrientationButton.MyButton.Pushed += Orientation_Pushed; // =============================================== // init layout and set preferred properties // =============================================== layoutTest = new LayoutTestBlock(); layout = layoutTest.LinearLayoutStrategy; layout.Orientation = OrientationType.Vertical; layout.Alignment = AlignmentType.LeftOrTopEdge; layout.XSpacing = 24; layout.YSpacing = 24; layout.WrapMaxSize = 950; layoutTest.MyControl.Box.Padding.SetLeftAndRight(16); layoutTest.MyControl.Box.Padding.SetTopAndBottom(32); layoutTest.MyControl.Layout(); // =============================================== AlignmentTestBlock.VMembers.Children.Add(Alignment); AlignmentTestBlock.VMembers.Children.Add(OrientationButton); AlignmentTestBlock.VMembers.Children.Add(layoutTest); this.Children.Add(AlignmentTestBlock); }
private void InitTextLine() { UniversalBlock TextLineTest = new UniversalBlock(); this.Children.Add(TextLineTest); TextLineTest.HMembers.Children.Add("labels, texts, buttons"); HContainerBlock line = new HContainerBlock(); TextLineTest.VMembers.Children.Add(line); line.Children.Add(new TextBoxBlock()); ButtonBlock b = new ButtonBlock("focusable"); b.MyControl.Focusable = true; line.Children.Add(b); line.Children.Add("bla"); line.Children.Add(new TestSelectionLabelBlock("Monday")); TextSelectionBlock fromArray = new TextSelectionBlock( new string[] { "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sonntag" }); line.Children.Add(fromArray); TextSelectionBlock fromEnum = new TextSelectionBlock( System.Windows.Forms.Keys.A); line.Children.Add(fromEnum); line.Children.Add(new TextBoxBlock()); }
public TutorialRootBlock6() : base() { n1 = new TutorialUniversalBlock(); c1 = new TutorialUniversalBlock(); c2 = new TutorialUniversalBlock(); TutorialUniversalBlock c3 = new TutorialUniversalBlock(); n1.VMembers.Children.Add(c1, c2, c3); this.Add(n1); ButtonBlock moveButton = new ButtonBlock("Move!!!"); moveButton.Pushed += moveButton_Pushed; this.Add(moveButton); }
private void InitButtons() { UniversalBlock ButtonsTest = new UniversalBlock(); HContainerBlock h = new HContainerBlock(); ButtonsTest.HMembers.Add("Buttons"); ButtonsTest.VMembers.Add(h); h.Add("Buttons: 1. text: "); h.Add(new ButtonBlock("caption")); h.Add(" 2. picture: "); h.Add(new ButtonBlock(PictureLibrary.Instance.Collapsed)); h.Add(" 3. picture and text: "); h.Add(new ButtonBlock(PictureLibrary.Instance.Delete, "imagebutton")); h.Add(" 4. text and picture: "); h.Add(new ButtonBlock("imagebutton", PictureLibrary.Instance.Plus)); ButtonBlock b2 = new ButtonBlock(PictureLibrary.Instance.Delete2, "under pic"); b2.MyButton.LayoutStrategy = LayoutFactory.VerticalIndented; ButtonsTest.VMembers.Children.Add(b2); this.Children.Add(ButtonsTest); }
public TutorialRootBlock4() : base() { HContainerBlock con = new HContainerBlock(); this.Add(con); button = new ButtonBlock("Hide the text"); text = new TextBoxBlock(); con.Add(button); con.Add(text); button.Pushed += button_Pushed; }