The TEdit.Height is fixed on Firemonkey Style, How to change it?

久未见 提交于 2019-12-11 08:18:26

问题


I am using a regular Firemonkey HD application and decided to use only the style that comes with MetropolisUI (just the style, it is not Metropolis app/form since I need it to be cross platform)

The problem is that TEdit is set to a fixed size, that is for me too big.

I have played to change the style by StyleBook, was not successful. I am newbie with styles and firemonkey.

Have tested other option incluing Chris Holliston using the interposer class.

However I need to reduce the height at design time, since I have many fields and the positioning is critical

Please, I would like to know the steps to change that (I was using the editstyle on TEdit.LookupStyle from MetropoliUIBlue)


回答1:


As a last resource I have decided to open the MetropolisUI.Style on notepad and take a look on what is inside.

I have found that "editstyle" that is the default for TEdit has the following structure:

object TLayout
    StyleName = 'editstyle'
    Height = 50.000000000000000000
    Width = 50.000000000000000000
    FixedHeight = 32

As we can see there is this FixedHeight.

I could not find that on the Style Editor.

Removing that tag FixedHeight, saving and load the style back again to StyleBook enabled me to change the height freely.



来源:https://stackoverflow.com/questions/23808294/the-tedit-height-is-fixed-on-firemonkey-style-how-to-change-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!