[FREE] TextboxUtil - ⌨️ Additional Tools To The Built-In TextBox Component!

you can add a option to select a range of text?

2 Likes

I am looking for a way to do that. Thank you.

2 Likes

Maybe this one can help you

@SimpleFunction(description = "Test")
public void SelectText(int start, int end) {
textbox.setSelection(start - 1, end - 1);
}

2 Likes

Probably this would help.

@SimpleFunction(description = "Selects the text of the TextBox according to the start and the end position. Only works if the TextBox is focused.")
    public void SelectPartial(AndroidViewComponent textBox, int start, int end) {
    View view = textBox.getView();
    EditText edit = (EditText) view;
    edit.setSelection(start - 1, end);
}
1 Like

Version 4 updated!

New blocks:

AlignText

image

Aligns the text of the TextBox. 1 is left, 2 is center and 3 is right.

Parameters: textBox = component, position = number (int)

SelectPartial

image

Selects the text of the TextBox according to the start and the end position. Only works if the TextBox is focused.

Parameters: textBox = component, start = number (int), end = number (int)

1 Like

Oh! Yes,

A perfect gooseman that can make life easy. :stuck_out_tongue_winking_eye:

*Just for fun. Don't take it seriously. :sweat_smile:

2 Likes

Version 5 updated!

New blocks:

Methods

MoveCursorPosition

image

Moves the cursor to the specific position. Only works when the TextBox is focused.

Parameters: textBox = component, position = number (int)

SetFont

image

Sets the font type of the TextBox. Use the blocks in the properties of this extension for the font parameter.

Parameters: textBox = component, font = text

SetTypeface

image

Sets the font type of the TextBox. Use the blocks in the properties of this extension for the font parameter.

Parameters: textBox = component, bold = boolean, italic = boolean

Properties

DefaultFont

image

A font block.

Returns: "DEFAULT"

Monospace

image

A font block.

Returns: "MONOSPACE"

SansSerif

image

A font block.

Returns: "SANS SERIF"

Serif

image

A font block.

Returns: "SERIF"

1 Like

You can set textbox direct like view

I'll try. I never thought setSelection can apply to View.

Add one more properties

@DesignerProperty(editorType = PropertyTypeConstants.PROPERTY_TYPE_BOOLEAN,
defaultValue = "True")
@SimpleProperty(category = PropertyCategory.APPEARANCE)
public void CursorVisible(boolean enabled) {
if(enabled){
view.setCursorVisible(enabled);
view.invalidate();
}
}

3 Likes

You are Incredible. keep it up :wink: :+1:

2 Likes

Version 6 available!

Updated description of extension.

image

Combined SetFont and SetTypeface blocks to SetFontTypeface.

New blocks:

SetCursorVisibility

image

Sets the visibility of the cursor.

Parameters: textBox = component, visible = boolean

SetFontTypeface

image

Sets the font typeface of the TextBox, including whether to bold, italicize, and the font of the TextBox. Use the blocks in the properties of this extension for the font parameter. If useCurrentFont is true, the font parameter will be ignored.

Parameters: textBox = component, bold = boolean, italic = boolean, font = text, useCurrentFont = boolean

2 Likes

Version 7 available!

DismissErrorMessage

image

Clears the error message shown on the tip of the given TextBox.

Parameters: textBox = component

SetHintColor

image

Sets the hint color for the given TextBox.

Parameters: textBox = component, color = color

SetMaxLines

image

Sets the maximum lines the TextBox can contain. This block only works with TextBoxes with normal input type.

Parameters: textBox = component, lines = number (int)

ShowErrorMessage

image

Shows an error message on the tip of the given TextBox.

Parameters: textBox = component, message = text

P.S. All features except RemoveFocus are available with the aiStarter Android emulator.

2 Likes

Version 8!

SetElevation

image

Sets the elevation for the given TextBox in pixels.

Parameters: textBox = component, elevation = number (float)

SetInputType

image

Sets the input type for the TextBox. Use the blocks in the Properties to set the type parameter.

Parameters: textBox = component, type = number (int)

SetPadding

image

Sets the padding of the given TextBox.

Parameters: textbox = component, left = number (int), top = number (int), right = number (int), bottom = number (int)

SetRotation

image

Rotates the TextBox according to the rotation angle.

Parameters: textBox = component, rotation = number (float)

3 Likes

Oh yes

Now tell textbox component to leave his job. Because now no need of him. The extensions are the king now. :stuck_out_tongue_winking_eye:

2 Likes

We have more options to add in this lol :rofl:

3 Likes

我都不知道該用哪一版了 :joy:

I don't know which version to study.

1 Like

現在下載 ,現在是最後一版。

ENGLISH: This is the latest version. Read the main post to download.

2 Likes

Tks your help! :grin:

1 Like

At the moment in my four textbobes the cursor shows up as a very tiny line.
How could I make the cursors bigger and more noticeable ?