我有FlowLayoutPanel的和用户控件的它与拖&放;下降的重新排序。这类作品。但问题是,孩子控制实际父用户控件的prevent拖动。
I have FlowLayoutPanel and UserControl's on it with drag & drop reordering. This sort of works. But the problem is that child controls prevent dragging of the actual parent UserControl.
所以我的问题是如何实现拖动包含子控件用户控件的?
So my question is how to enable dragging of a UserControl that contains child controls?
如果我理解你的权利,我有同样的问题,因为你和我所传播的子元素的活动,它的父就解决了。
If I understand you right I had the same problem as you and I solved it by propagating events of the child element to it's parent.
如果你有一个包含标签的可拖动用户控件。你必须在标签的事件发生时调用用户控件的事件。例如。在标签的onmousedown事件()调用用户控件的onmousedown事件(),只是通过事件参数数量。我没有找到一个比处理所需的阻力,并分别下降每个事件更好的办法。
If you have a draggable UserControl containing a label. You have to call the events of the UserControl when the events of the label occurs. E.g. in the Label's OnMouseDown() call the UserControl's OnMouseDown() and just pass the Event-Args. I didn't find a better way than handling each event that is required for drag and drop separately.
上一篇:为 TFliteconverter 创建代表性数据集的正确方法是什么?代表性、正确、方法、数据
下一篇:使用 tf.keras.preprocessing.image_dataset_from_directory() 时如何在预测期间获取文件名?文件名、如何在、keras、tf