根据文本长度自动拉伸或缩小`< textField>`? [英] Automatically stretch or shrink `<textField>` depending on text length?

查看:131
本文介绍了根据文本长度自动拉伸或缩小`< textField>`?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一个接一个地有两个< textField> 。是否可以根据文本长度自动拉伸或缩小它们?击中我眼睛的唯一属性是 isStretchWithOverflow ,但导致一个文字覆盖另一个 - 这不是我的意思。有人帮忙吗?它甚至可能吗?

I have two <textField> one by one. Is possible to automatically stretch or shrink them depending on text length? The only attribute which hit my eyes, was the isStretchWithOverflow but cause that one text is covering another - that is not what I meant. Anybody helps? Is it even possible?

推荐答案

我假设您正在谈论垂直拉伸。

I assume you are talking about stretch vertically.

在这种情况下, isStretchWithOverflow 正是您所需要的。

In that case isStretchWithOverflow is exactly what you need.

第二个第一个覆盖的< textfield> 是因为位置设置。您可能将其设置为修复,因此在第一个拉伸时它不会移动。将第二个< textfield> 的位置设置更改为 Float 应该有效。

The second <textfield> covered by first one is because the position setting. You probably has it setting to Fix, so it dose not move while first one stretched. Change the position setting of second <textfield> to Float should works.

这篇关于根据文本长度自动拉伸或缩小`&lt; textField&gt;`?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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