GraffitiTextField

View Categories

Preview #

About #

GraffitiTextField is an enhanced functionality TextField and TextArea host control that provides the following advanced functionality:

  • Unfocused text alignment
  • Autocomplete
  • Extensive custom colorization
  • Embedded icon
  • Embedded clear button
  • Dropdown menu support (via GraffitiMenuItem)
  • Animated pulsing for drawing users’ attention
  • Unvalidated, Valid, and Invalid state displays
  • Bordered or Solid display types
  • And more…

Enumerations #

NameValues
IconPositionsLeft
Right
StatesUnvalidated
Valid
Invalid
TypesBordered
Solid

Constants #

This class exposes no constants.

Events #

NameParametersReturn TypeDescription
ClearPressedNoneBooleanRaised when the user presses the clear button. Return True to cancel default action of clearing the value text.
IconPressedNoneNoneRaised when the user presses the icon.
KeyPressedkey as StringBooleanRaised when the user presses a keyboard key. Return True to cancel default action.
MenuItemSelecteditem as GraffitiMenuItemNoneRaised when the user selects an item from the dropdown menu.
ReturnPressedNoneBooleanRaised when the user presses the Return key. Return True to cancel default action.
TextChangedNoneNoneRaised when the content of the input control has changed.

Methods #

This class exposes no methods.

Properties #

NameTypeDefault ValueDescription
AlignmentMobileTextControl.AlignmentsMobileTextControl.Alignments.DefaultAlignment of the text relative to the outer bounds of the control.
AutocompleteBooleanFalseWhen enabled and values are provided to the AutocompleteValues property, the control will attempt to autocomplete user input based on those values.
BackgroundColorColorGroupNilCustom background color.
BorderColorColorGroupNilCustom border color.
BorderRadiusInteger8Size, in points, of the border’s corner radii.
BorderSizeInteger1Size, in points, of the border.
ClearButtonColorColorGroupNilCustom clear button color.
ClearButtonSizeInteger12Dimensions used to draw the clear button.
FontFontFont.SystemFontFont used for drawing the text and applied to the hosted MobileTextControl.
HasBorderBooleanTrueControls the visibility of the border.
HasClearButtonBooleanFalseControls the visibility of the clear button when the hosted control does not have focus.
HintString“”Placeholder text that is drawn when the hosted control does not have focus and has no text value.
HintColorColorGroupNilCustom color used to draw the Hint text.
IconPictureNilIcon picture to be drawn within the control.
IconColorColorGroupNilCustom color overlaid on Icon when IconColorized = True.
IconColorizedBooleanFalseWhen True, the icon will be colorized to match the content or using the IconColor property value.
IconPositionGraffitiTextField.IconPositionsGraffitiTextField.IconPositions.LeftLocation of the icon within the display.
IconSizeInteger16Size, in points, to use when drawing the icon.
InputControl (Read-Only)MobileTextControlAutomaticReturns a reference to the currently active, hosted control. Either MobileTextArea or MobileTextField.
IsPulsingBooleanFalseControl will display a pulsing animation when True. Useful for drawing users’ attention to the control.
Menu (Read-Only)GraffitiMenuItemAutomaticThe parent GraffitiMenuItem of all items that the developer wishes to display in the menu dropdown.
MenuIconSizeInteger12Size, in points, to use when drawing the menu icon.
MultilineBooleanFalseControls various aspects of display and functionality.
ReadOnlyBooleanFalseWhen True, users will not be able to modify the value of the control by direct input.
StateGraffitiTextField.StatesGraffitiTextField.States.UnvalidatedControls the displayed validation state.
StateInvalidColorColorGroupNilCustom color to use when drawing the Invalid state.
StateUnvalidatedColorColorGroupNilCustom color to use when drawing the Unvalidated state.
StateValidColorColorGroupNilCustom color to use when drawing the Valid state.
TextString“”Text value of the control.
TextColorColorGroupNilCustom text color when editing the control’s value or when a value exists and the control does not have focus.
TypeGraffitiTextField.TypesGraffitiTextField.Types.BorderedControls how the component is drawn.

Notes #

Accessing Other Functionality #

The InputControl property can be used to obtain a reference to the embedded MobileTextControl, which can then be cast to MobileTextArea or MobileTextField to directly modify that control or access its member functions and properties. This allows, for example, changing the selection range within the control.