Line_number❖
kivydk.uix.widgets.line_number
Overview❖
Todo
Description of this module need to be implemented.
Fixing the rendering glitch when trying to customize the appearance.
Reference❖
- class LineNumber(text_input, **kwargs)❖
Bases:
Widget- align: OptionProperty❖
Horizontal alignment of the text.
Default
right
Options
left
center
right
- background_color: ColorProperty❖
Current tint color of the background.
Default
[1, 1, 1, 1]
white
- background_texture❖
Background image of the line numbers.
background_textureis aStringPropertyand defaults to ‘atlas://data/images/defaulttheme/textinput’.
- border❖
Border used for
BorderImagegraphics instruction. Used withbackground_texture. Can be used for a custom background.It must be a list of four values: (bottom, right, top, left). Read the BorderImage instruction for more information about how to use it.
borderis aListPropertyand defaults to [4, 4, 4, 4].
- font_context❖
Font context. None means the font is used in isolation, so you are guaranteed to be drawing with the TTF file resolved by
font_name. Specifying a value here will load the font file into a named context, enabling fallback between all fonts in the same context. If a font context is set, you are not guaranteed that rendering will actually use the specified TTF file for all glyphs (Pango will pick the one it thinks is best).If Kivy is linked against a system-wide installation of FontConfig, you can load the system fonts by specifying a font context starting with the special string system://. This will load the system fontconfig configuration and add your application-specific fonts on top of it (this imposes a significant risk of family name collision, Pango may not use your custom font file, but pick one from the system)
Note
This feature requires the Pango text provider.
font_contextis aStringPropertyand defaults to None.
- font_family❖
Font family, this is only applicable when using
font_contextoption. The specified font family will be requested, but note that it may not be available, or there could be multiple fonts registered with the same family. The value can be a family name (string) available in the font context (for example a system font in a system:// context, or a custom font file added usingkivy.core.text.FontContextManager). If set to None, font selection is controlled by thefont_namesetting.Note
If using
font_nameto reference a custom font file, you should leave this as None. The family name is managed automatically in this case.Note
This feature requires the Pango text provider.
font_familyis aStringPropertyand defaults to None.
- font_name❖
Filename of the font to use. The path can be absolute or relative. Relative paths are resolved by the
resource_findfunction.font_nameis aStringPropertyand defaults to ‘Roboto’. This value is taken fromConfig.
- font_size❖
Font size of the text in pixels.
font_sizeis aNumericPropertyand defaults to 15sp.
- foreground_color❖
Current color of the foreground, in (r, g, b, a) format.
foreground_coloris aColorPropertyand defaults to [0, 0, 0, 1] (black).
- padding❖
[padding_left, padding_right].
padding also accepts a one argument form [padding_horizontal].
paddingis aVariableListPropertyand defaults to [4, 4].- Type:
Horizontal padding of the text
- width_min❖
Minimum desired width of the text in pixels.
width_minis aNumericPropertyand defaults to 18sp.