public class PictureEditEx : PictureEdit
{
public PictureEditEx()
{
this.SetStyle(ControlStyles.Selectable, false);
}
private ImageTextControl[] ListButton = new ImageTextControl[] { };
public ImageTextControl[] Buttons
{
get { return this.ListButton; }
set
{
this.ListButton = value;
//Invalidate();
foreach (ImageTextControl ctr in ListButton)
{
this.Controls.Add(ctr);
}
}
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
//if (ListButton.Length > 0)
//{
// foreach (Button mbtn in ListButton)
// {
// ControlPaint.DrawButton(e.Graphics, new Rectangle(mbtn.Location, mbtn.Size), ButtonState.Normal);
// }
//}
}
private ImageTextControlCollection mlist = null;
protected override Control.ControlCollection CreateControlsInstance()
{
//return base.CreateControlsInstance();
if (mlist == null)
mlist = new ImageTextControlCollection(this);
return mlist;
}
}
PictureEditEx
最新推荐文章于 2022-05-10 22:15:44 发布