本文介绍了无面板继承的类面板控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道面板和tabcontrol控件如何允许用户将控件拖放到它们上,我想构建类似的东西,但是找不到任何有用的东西. 继承面板或tabcontrol类是我不想做的事情,我真的很想知道拖放与设计器如何工作. 另外,我想用C#做到这一点. 预先感谢, Nbgangsta
I was wondering about how the panel and tabcontrol controls allow the user to drag and drop controls onto them, I''m want to build something alike but can''t find anything of use. Inheriting the panel or tabcontrol class is something I don''t want to do, I really want to know how the drag and drop works with the designer. Also, I''d like to do this with C#. Thanks in advance, Nbgangsta
推荐答案它们处理各种拖动事件: DragEnter DragLeave DragDrop DragOver ItemDrag GiveFeedback 您可以在所需的任何控件上处理这些事件.这是一个不错的链接: www.c-sharpcorner/uploadfile/mgold/doingdraganddropusingcsharp11302005020610am/doingdraganddropusingcsharp.aspx /a> [ ^ ] They handle the various drag events: DragEnter DragLeave DragDrop DragOver ItemDrag GiveFeedback You can handle those events on any control you want. Here''s a decent link: www.c-sharpcorner/uploadfile/mgold/doingdraganddropusingcsharp11302005020610am/doingdraganddropusingcsharp.aspx[^]
更多推荐
无面板继承的类面板控件
发布评论