Subscribe to this list via RSS Blog posts tagged in TTextSettings

Posted by on in Blogs
Setting Text Parameters in FireMonkey One of small but rather useful new features of FireMonkey introduced in XE3 version is the FMX.Types.ITextSettings interface. Often we need to change some parameters of an output text for a component, which class is not known a priori. For example, a component can be of the TText or TTextControl classes. These classes have Color or FontColor properties respectively. In general case, to set color to one of these properties, one need first check the type of an object instance and then cast the typ...
Установка параметров текста в Fire Monkey 2 Среди незаметных, но полезных, на мой взгляд, нововведений в XE3 имеется интерфейс ITextSettings, который описан в модуле FMX.Types. Часто нам надо изменить некоторые параметры выводимого текста для компонента, класс которого нам заранее неизвестен, например это может быть  TText, или TTextControl у которых есть свойства Color и FontColor. Раньше пришлось бы проверять тип экземпляра и выполнять приведение типов: if Obj is Ttext then TText(Obj).Color := MyColor else if Obj is...
  • Page :
  • 1

Check out more tips and tricks in this development video: