private void ConfDialog()
        {
            GLFormConfigurable cform = new GLFormConfigurable("test");

            cform.Add(new GLFormConfigurable.Entry("Lab1", typeof(GLLabel), "Label 1 ", new Point(10, 10), new Size(200, 24), "TT"));
            cform.Add(new GLFormConfigurable.Entry("But1", typeof(GLButton), "But 1", new Point(10, 40), new Size(200, 24), "TT"));
            cform.Add(new GLFormConfigurable.Entry("Com1", "two", new Point(10, 70), new Size(200, 24), "TT", new string[] { "one", "two", "three" }));
            cform.Add(new GLFormConfigurable.Entry("Textb", typeof(GLTextBox), "text box", new Point(10, 100), new Size(200, 24), "TT"));
            cform.Add(new GLFormConfigurable.Entry("Double", typeof(GLNumberBoxDouble), "10.2", new Point(10, 100), new Size(200, 24), "TT"));
            cform.Add(new GLFormConfigurable.Entry("OK", typeof(GLButton), "OK", new Point(160, 300), new Size(100, 24), "TT")
            {
                Anchor = AnchorType.Right | AnchorType.Bottom
            });
            cform.InitCentered("Config Form Test");
            cform.Trigger += (cb, en, ctrlname, args) =>
            {
                if (ctrlname == "OK")
                {
                    cform.Close();
                }
            };
            displaycontrol.Add(cform);
        }
        private void ConfDialog2()
        {
            GLMultiLineTextBox tb = new GLMultiLineTextBox("MLT", new Rectangle(10, 10, 1000, 1000), "this is some text\r\nAnd some more");
            var sizer             = tb.CalculateTextArea(new Size(50, 24), new Size(400, 400));

            tb.Size = sizer.Item1;
            tb.EnableHorizontalScrollBar = sizer.Item2;
            tb.CursorToEnd();

            GLFormConfigurable cform = new GLFormConfigurable("ConfDialog2");

            cform.AddOK("OK");
            cform.AddCancel("Cancel");
            cform.Add(new GLFormConfigurable.Entry("info", tb));
            cform.InstallStandardTriggers();
            cform.Init(new Point(200, 200), "Config Form Test Long Title and even longer one");
            cform.SetMinimumSizeOnAutoSize = true;
            displaycontrol.Add(cform);      // display and autosize
            cform.AutoSize   = false;
            cform.Moveable   = true;
            cform.Resizeable = true;
            tb.Width         = cform.ClientWidth - 10 * 2;
            System.Diagnostics.Debug.WriteLine($"Autosize {cform.AutoSize}");
        }