简体   繁体   English

网格的自定义列或行-Delphi 10.1柏林

[英]Custom Column or Row for Grid - delphi 10.1 berlin

I am looking for a solution to create a custom column or row for a fmx.grid or fmx.stringgrid in Dlphi 10.1, like numberbox column. 我正在寻找一种为Dlphi 10.1中的fmx.grid或fmx.stringgrid创建自定义列或行的解决方案,例如numberbox列。 there are some explanations using CreateCellControl funtion, but not working in 10.1 有一些使用CreateCellControl函数的解释,但在10.1中不起作用

It seems CreateCellControl doesn't exist anymore in Delphi 10.1 Berlin (it existed at least in XE7, which I checked, and probably in other versions too). 似乎在Delphi 10.1 Berlin中不再存在CreateCellControl (它至少存在于我检查过的XE7中,并且可能也存在于其他版本中)。

I suggest you use TCurrencyColumn which limits entries to numeric only and aligns entries to the right of the column. 我建议您使用TCurrencyColumn ,它将条目限制为仅数字,并将条目对齐到该列的右侧。 Alternatively you can check and prevent wrong entries in the OnSetValue event. 或者,您可以检查并防止在OnSetValue事件中输入错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM