LogoLogo
v7.0.0
v7.0.0
  • TotalCross Overview
  • TotalCross Javadoc
  • TotalCross Changelog
  • Roadmap
  • Documentation
    • Getting Started
      • First embedded project with TotalCross
    • Components
      • Accordion
      • Aligned Labels
      • Button
      • Check
      • ComboBox
      • Dynamic Scroll
      • Edit
      • Floating Button
      • Gpiod
      • Grid
      • GridContainer
      • Image
      • ImageControl
      • ImageList
      • Label
      • Material Icons
      • Material Window
      • MessageBox
      • Multi Edit
      • Progress Bar
      • Progress Box
      • Radio
      • Radio Group
      • Scroll Container
      • Side Menu
      • Slider
      • Sliding Window
      • Spin List
      • Spinner
      • Switch
      • Tabbed Container
      • Velocimeter
    • APIs
      • API Overview
      • API Rest
      • Asynchronous Task
      • Camera
      • Control
        • Main Window
        • Window
        • Container
      • GPS
      • HTTPS and SSL
      • JSON
      • Maps
        • Maps - Deprecated
        • Static Map
      • Material Design Standards
      • Ninepath
      • Notifications
      • PrinterManager
      • Push Notification Firebase
      • Scanner
      • SOAP
      • Socket
      • SocketServer
      • SQLite Encryption
      • QR Code Generator
      • totalcross.sys
      • Youtube API
    • Creating an Issue
    • Contributing
      • Branch workflow
      • Writing documentation
    • Guides
      • App Architecture
        • Suggested Architecture
        • Why do Design Patterns help with the application's organization?
          • MVC Architecture Pattern
          • Template Pattern
          • Data Persistence: DAO Pattern.
        • Separation of concepts: What is the best way to create UI interfaces?
        • Positioning
          • Manual Positioning
        • Relative Positioning
        • Best practices to improve project maintenance
      • Device Simulator
      • Package your app from scratch
        • TotalCross SDK
        • Environment Variables in IDE
          • Eclipse
          • IntelliJ
        • Deploy your app with a dependecy TC
        • Deploy iOS
          • Using Development certificate to test your apps
      • Understanding TotalCross for Linux ARM
      • Running C++ applications with TotalCross
      • Web Services
    • Miscelaneous
      • Java JDK 8
      • Maven
      • Installing Visual Studio Code
    • FAQ
      • IMEI in Android 10
Powered by GitBook
On this page
  • Overview
  • Source Code
  • Attributes
  • Methods
  • References

Was this helpful?

  1. Documentation
  2. Components

Multi Edit

PreviousMessageBoxNextProgress Bar

Last updated 6 years ago

Was this helpful?

Overview

A MultiEdit is a field used to show or alter text in various disposed line

Source Code

MultiEditSample.java
import totalcross.sys.Settings;
import totalcross.ui.MainWindow;
import totalcross.ui.MultiEdit;

public class MultiEditSample extends MainWindow {
	public MultiEditSample() {
		setUIStyle(Settings.MATERIAL_UI);
		Settings.uiAdjustmentsBasedOnFontHeight = true;
	}

	public void initUI() {
		MultiEdit multiEdit = new MultiEdit();
		multiEdit.caption = "MultiEdit";
		add(multiEdit, LEFT + 100,CENTER, FILL - 100, DP + 48);
	}
}

Attributes

Type

Name

Description

boolean

autoSelect

When true, the text will be selected when the MultiEdit is foccused

String

caption

The MultiEdit's placeholder text

boolean

justify

Justify the text when the MultiEdit is not editable

boolean

drawDots

If true, a dotted line will be drawn on each line

Methods

Type

Name

Description

Constructor

MultEdit( )

Creates a MultiEdit for user input with the default size and spacing

Constructor

MultiEdit(int rowCount, int spaceBetweenLines)

Creates a MultiEdit for user input with the passed row quantity and line spacing.

Constructor

MultiEdit(String mask, int rowCount, int spaceBetweenLines)

Creates a MultiEdit for user input with the passed row quantity and line spacing, but with a mask.

void

setEditable(boolean on)

Will enable or disable the MultiEdit. Can be used as a way to make sure the user don't modify something that was already saved on server and can't be modified without proper authorization

String

getText( )

Returns the text within the MultiEdit

void

setMaxLength(int length)

Is used to limit the characters number the user can digit on the text field

References

See the for more information.

MultiEdit Java Docs