| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /*******************************************************************************
- * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:ListControlContainer.cs
- * 2.功能描述:容器控件
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 陈晓野 2014/09/04 1.00 新建
- *******************************************************************************/
- using System.ComponentModel;
- using System.Drawing;
- using System.Windows.Forms;
- namespace Dongke.IBOSS.PRD.Basics.BaseControls
- {
- /// <summary>
- /// A container control for the ListControl to ensure the ScrollBar on the ListControl does not
- /// Paint over the Size grip. Setting the Padding or Margin on the Popup or host control does
- /// not work as I expected.
- /// </summary>
- [ToolboxItem(false)]
- public partial class ListControlContainer : UserControl
- {
- #region CONSTRUCTOR
- public ListControlContainer()
- : base()
- {
- BackColor = SystemColors.Window;
- BorderStyle = BorderStyle.FixedSingle;
- AutoScaleMode = AutoScaleMode.Inherit;
- ResizeRedraw = true;
- // If you don't set this, then resize operations cause an error in the base class.
- MinimumSize = new Size(1, 1);
- MaximumSize = new Size(500, 500);
- }
- #endregion
- #region RESIZE OVERRIDE REQUIRED BY THE POPUP CONTROL
- /// <summary>
- /// Prescribed by the Popup class to ensure Resize operations work correctly.
- /// </summary>
- /// <param name="m"></param>
- protected override void WndProc(ref Message m)
- {
- if ((Parent as Popup).ProcessResizing(ref m))
- {
- return;
- }
- base.WndProc(ref m);
- }
- #endregion
- }
- }
|