控制创建停靠对象 [英] Control the creation docked objects

查看:106
本文介绍了控制创建停靠对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我想在另一个面板中创建多个按钮。这些创建的按钮用于tuchscreen应用程序。

I want to create several buttons within another panel. These created buttons are used for a tuchscreen app.

每个Button都会显示DockStyle TOP。问题是第二个创建的按钮首先位于第一个上方,而第二个创建按钮位于第二个上方。由于按钮是从查询中动态生成的,我可以反转我的订单并且它可以工作。

Each Button reveices a DockStyle TOP. The problem is that the second created button comes above th first, and the thrid above the second. As the buttons are dynamically generated from a query i just can reverse my ordering and it works.

但我想知道是否可以创建一个按钮并将其停靠在现有按钮下面这两个都是样式top。

But i want to know if it is possible to create a button and dock it below an existing button, both with style top.

这是我的代码。

推荐答案

停靠顺序由控件的顺序给出在Controls集合中,所以t他唯一能做的就是改变添加按钮的顺序。

The docking order is given by the order of the controls in the Controls collection so the only thing you can do is to reverse the order of adding the buttons.


这篇关于控制创建停靠对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆