⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 axgroupbox.cs

📁 C#实现DHTML编辑器功能!
💻 CS
字号:
// DINAMIC XML Editor
//
// Copyright (c) 2002-2003 Dusan Hlavaty
// mailto: duddo@atlas.cz
//
// This software is licensed under the terms of
// GNU General Public license
//
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Windows.Forms;


namespace XML_editor.MyComponents
{
	/// <summary>
	/// Reprezentuje Windowsovy group box.
	/// </summary>
	/// <remarks>
	/// <para>AxGroupBox zobrazuje ram okolo skupiny controls-ov bez titulku.
	/// Pouzivaj AxGroupBox na logicke zoskupovanie skupiny controls-ov na formulari.</para>
	/// </remarks>
	public class AxGroupBox : System.Windows.Forms.Panel
	{
		private int min_height = 100;

		// -------------------------------------------------------------------------
		/// <summary>
		/// Inicializuje GroupBox komponentu
		/// </summary>
		public AxGroupBox(int min_height)
		{
			this.min_height = min_height;
			this.AutoScroll = true;
			this.SetStyle(ControlStyles.ResizeRedraw, true);
		}
		
		// -------------------------------------------------------------------------
		/// <summary>
		/// Tato metoda 'pretazuje virtualnu metodu' <see cref="System.Windows.Forms.Control.OnPaint"/> 
		/// </summary>
		/// <param name="e"><see cref="PaintEventArgs"/> ktory obsahuje informacie o evente</param>
		protected override void OnPaint(PaintEventArgs e)
		{
			e.Graphics.DrawRectangle(SystemPens.ControlDark, 
																new Rectangle(ClientRectangle.X,
																ClientRectangle.Y,
																ClientRectangle.Width - 1,
																Math.Max(ClientRectangle.Height, this.min_height) - 1));

		}

	} // public class AxGroupBox : : System.Windows.Forms.GroupBox
} // namespace XML_editor.MyComponents

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -