起步软件技术论坛-X3

 找回密码
 立即注册
搜索
12
返回列表 发新帖
楼主: cdz0451

Imag控件问题**

[复制链接]
发表于 2007-12-24 14:05:20 | 显示全部楼层
TControl.Anchors
Specifies how the control is anchored to its parent.

property Anchors: TAnchors;

Description

Use Anchors to ensure that a control maintains its current position relative to an edge of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored.

If a control is anchored to opposite edges of its parent, the control stretches when its parent is resized. For example, if a control has its Anchors property set to [akLeft, akRight], the control stretches when the width of its parent changes.

Anchors is enforced only when the parent is resized. Thus, for example, if a control is anchored to opposite edges of a form at design time and the form is created in a maximized state, the control is not stretched because the form is not resized after the control is created.

Note:        If a control should maintain contact with three edges of its parent (hugging one side of the parent and stretching the length of that side), use the Align property instead. Unlike Anchors, Align allows controls to adjust to changes in the size of other aligned sibling controls as well as changes to the parent抯 size.


type TAnchors = set of TAnchorKind;
type TAnchorKind = (akTop, akLeft, akRight, akBottom);
回复 支持 反对

使用道具 举报

发表于 2007-12-24 14:06:50 | 显示全部楼层
可以做一个边框,anchors定义为left right top bottom
做一条线,anchors定义为left right top
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-12-24 14:11:23 | 显示全部楼层
看到这个图了吧,非常不好控制. 标题是2个 Image 拼上的. 下面 是 2条竖线和一条横线
这个要怎么控制啊 真的迷糊了
回复 支持 反对

使用道具 举报

发表于 2007-12-24 14:44:52 | 显示全部楼层
看12楼,只需要两个图,而且我把需要怎么设置属性都写了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-12-24 15:01:56 | 显示全部楼层
我的图 你看到了把 你说得 1一个边框和一条线? 实现这个不够吧?

我这个是用4个图拼的
回复 支持 反对

使用道具 举报

发表于 2007-12-24 15:29:13 | 显示全部楼层
1个边框,是有四边的
再来一条线不就够了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-12-24 15:31:57 | 显示全部楼层
你说得这个意思 我明白了  但是 最新信息 这个背景色 怎么加呢
回复 支持 反对

使用道具 举报

发表于 2007-12-24 17:33:48 | 显示全部楼层
在线上加一块带颜色的区域
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-3 16:22 , Processed in 0.043683 second(s), 14 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表