子窗体的定位,如StatusBar [英] Child Form positioning like StatusBar

查看:59
本文介绍了子窗体的定位,如StatusBar的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有MenuBar和StatusBar的MDIForm。当我创建一个子窗体并将其定位为 Align = alBottom时,该窗体将离开屏幕区域,并激活主窗体滚动条。如何将子窗体放在StatusBar上方?

I have a MDIForm with a MenuBar and a StatusBar. When I create a childform and position it with "Align = alBottom" the form goes out off the screen area and mainform scrollbars are activated. How to position the childform just over the StatusBar?

推荐答案

对于没有父项负责显示的控件,Align和Anchors不能按预期工作。

这就是您的ChildForm发生的事情:它的父级为nil。

此外,对于ChildForms,通常遵循常规Windows管理(最大化,最小化,级联,平铺...)

如果要将其放置在某个特定位置,最好的选择是使用MainForm的ClientHeight和ClientWidth计算将其放置在何处。

Align and Anchors do not really work as expected for a Control that has no Parent responsible for displaying it.
That is what happens to your ChildForm: its Parent is nil.
Besides, for ChildForms it's more usual to follow the normal Windows management (maximize, minimize, cascade, tile...)
If you want to position it some particular place, your best bet is to calculate where to place it using the MainForm's ClientHeight and ClientWidth.

这篇关于子窗体的定位,如StatusBar的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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