如何按控件的z顺序对控件进行排序? [英] How to sort controls by their z-order ?

查看:76
本文介绍了如何按控件的z顺序对控件进行排序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好!
我目前正在开发一个运行时设计器,该设计器允许拖放工具并打印最终文档.但是某些控件相互绘制,并且不遵守其z顺序,因此我需要通过以下方式绘制每个控件:它是z顺序的..我无法弄清楚该怎么办?!
(我尝试使用"GetChildIndex",但它没有用)
如果有.Net或本机方式,请让我知道..
我会很感激! ,通过任何方式..

Hi all !
I''m currently developing a run-time designer that allows to drag-drop tools and print the final document, But some controls painted over each other and don''t respect their z-order, so I needed to paint each control by it''s z-order .. How to do that I''m unable to figure it out ?!
(I tried to use "GetChildIndex" but it''s not useful)
if there is a .Net or Native way please let me know ..
I''ll be so grateful ! ,thanks any way ..

推荐答案

在.NET中没有访问ZOrder的特定方法-由控件插入控件的顺序决定.列表.但是,您可以使用 GetChildIndex [ SetChildIndex [
There is no specific way to access the ZOrder in .NET - it is decided by the order in which controls are inserted into the Controls List. You can however use the GetChildIndex[^] and SetChildIndex[^] methods to find / reorganize them.


这篇关于如何按控件的z顺序对控件进行排序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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