Ejemplo n.º 1
0
        private void DrawHeader(ref int rowIndex)
        {
            if (_hint.ShowHeader)
            {
                _overarchingPanel.RowStyles.Add(new RowStyle(SizeType.AutoSize));

                // Add "Key" + ":" + "Value"
                AddLabel(_hint.KeyLabel, rowIndex, 0);
                AddLabel(_hint.ValueLabel, rowIndex, 2);
                rowIndex++;
            }

            // Draw separator. If no header defined, still add it to make layout better.
            _overarchingPanel.RowStyles.Add(new RowStyle(SizeType.AutoSize));

            HorizontalLineCtrl line = new HorizontalLineCtrl();

            line.Padding = new Padding(0, 0, 0, 0);
            line.Anchor  = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            line.Visible = (_hint.ShowHeader);

            _overarchingPanel.SetColumnSpan(line, ColCount);
            _overarchingPanel.Controls.Add(line, 0, rowIndex);

            rowIndex++;
        }
Ejemplo n.º 2
0
        private void DrawSeparator(ref int rowIndex)
        {
            _overarchingPanel.RowStyles.Add(new RowStyle(SizeType.AutoSize));

            HorizontalLineCtrl line = new HorizontalLineCtrl();

            line.Padding = new Padding(0, 0, 0, 0);
            line.Anchor  = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;

            _overarchingPanel.SetColumnSpan(line, 2);
            _overarchingPanel.Controls.Add(line, 0, rowIndex);

            rowIndex++;
        }