====== Text Features ====== ===== Styling Text ===== In jControls, text is just like any other shape, so it can also be styled using the same [[jcontrols:fills_and_borders:index|fill]], [[jcontrols:fills_and_borders:index|border]], and [[jcontrols:gloss_and_dropshadow:index#dropshadow_property|drop shadow]] features. | {{ styled_text.png }} | {{text_features_example_properties.png}} | Please note that the above example was created with 3 different [[jcontrols:jlabel:index|jLabel]] controls, one for each line, so the color gradient is repeated for each line. ===== ForeColor Property ===== Controls with a more rich ''TextAppearance'' property will override the [[https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.forecolor|ForColor]] property inherited from the [[https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control|Control]] class. If, however, the ''TextAppearnace'' properties result in nothing being drawn (i.e. the ''Thickness'' is 0, and ''Fill'' and ''Border'' colors are ''Color.Transparent'') then the control will use the ''ForeColor'' property instead. In other words, by configuring the ''TextAppearance'' properties, developers choose whether to utilize the ''ForeColor'' property or not. Users will most likely prefer to use the rich features of the ''TextAppearance'' property, so ''ForeColor'' usually defaults to ''Color.Transparent''. ===== Multi-line Text ===== All jControls with a relevant ''Text'' property can be edited in the designer or at runtime to have multi-line text. {{ http://downloads.comfiletech.com/jControls/videos/jline_multiline.mp4?664x224 }} ===== Alignment ===== Text can be aligned to any edge within the controls bounds, minus its padding. {{ http://downloads.comfiletech.com/jControls/videos/jlabel_alignment.mp4?664x182 }} ===== Padding ===== A control's text padding, which is applied in addition to the control's padding, can be used to further constrain the bounding box within which the text is drawn. This can be used to offset the text, or reserve space within the control for other visuals. {{ http://downloads.comfiletech.com/jControls/videos/jlabel_padding.mp4?662x238 }} Padding is often added to the text appearance of a pressed button in order create the illusion of movement when the button is pressed. ===== Font Fallback ===== jControls does not currently implement [[https://en.wikipedia.org/wiki/Fallback_font|font fallback]]. If you need to create a multi-language UI, please use a font that has the glyphs for all languages, or separate each language into separate controls each with a different font configuration for the language it will display. ===== Text Wrapping ===== jControls does not currently implement automatic text wrapping. To wrap text, please add newlines to the ''Text'' property as illustrated in the [[jcontrols:text_features:index#multi-line_text|Multiline Text]] description.