TextBoxクラス

クラス日本語解説は準備中

ひとことで言うと

TextBoxは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):A 2D user interface element that displays player-editable text.

クラスの関係

受け継いでいるクラス:Object → Instance → GuiBase → GuiBase2d → GuiObject → TextBox

プロパティ(29)

名前と書き方説明
ClearTextOnFocus
TextBox.ClearTextOnFocus: boolean
Determines whether clicking on the TextBox will clear its TextBox.Text property.
ContentText
TextBox.ContentText: string
A copy of TextBox.Text that contains exactly what is being rendered by the TextBox.
CursorPosition
TextBox.CursorPosition: int
Determines the offset of the text cursor in bytes, or -1 if there is no cursor.
FontFace
TextBox.FontFace: Datatype.Font
Determines the font face used to render text.
LineHeight
TextBox.LineHeight: float
Scales the spacing between lines of text in the TextBox.
MaxVisibleGraphemes
TextBox.MaxVisibleGraphemes: int
The maximum number of graphemes the TextBox can show.
MultiLine
TextBox.MultiLine: boolean
When set to true, text inside a TextBox is able to move onto multiple lines.
OpenTypeFeatures
TextBox.OpenTypeFeatures: string
Applies OpenType typographic features to the text rendered by the TextBox.
OpenTypeFeaturesError
TextBox.OpenTypeFeaturesError: string
Read-only property that describes why the TextBox.OpenTypeFeatures string could not be applied.
PlaceholderColor3
TextBox.PlaceholderColor3: Color3
Sets the text color that gets used when no text has been entered into the TextBox.
PlaceholderText
TextBox.PlaceholderText: string
Sets the text that gets displayed when no text has been entered into the TextBox.
RichText
TextBox.RichText: boolean
Determines whether the TextBox renders the Class.TextBox.Text|Text string using rich text formatting.
SelectionStart
TextBox.SelectionStart: int
Determines the starting position of a text selection.
ShowNativeInput
TextBox.ShowNativeInput: boolean
If set to true, input native to the platform is used instead of Roblox's built-in keyboard.
Text
TextBox.Text: string
Determines the string rendered by the TextBox element.
TextBounds
TextBox.TextBounds: Vector2
The size of a TextBox element's text in offsets.
TextColor3
TextBox.TextColor3: Color3
Determines the color of non-placeholder rendered text.
TextDirection
TextBox.TextDirection: TextDirection
Direction in which the text is rendered.
TextEditable
TextBox.TextEditable: boolean
Determines whether the player can change the Class.TextBox.Text|Text.
TextFits
TextBox.TextFits: boolean
Whether the text fits within the constraints of the TextBox.
TextScaled
TextBox.TextScaled: boolean
Changes whether text is resized to fit within the TextBox.
TextSize
TextBox.TextSize: float
Determine the line height of text in offsets.
TextStrokeColor3
TextBox.TextStrokeColor3: Color3
Determines the color of the text stroke (outline).
TextStrokeTransparency
TextBox.TextStrokeTransparency: float
Determines the transparency of the text stroke (outline).
TextTransparency
TextBox.TextTransparency: float
Determines the transparency of the rendered text.
TextTruncate
TextBox.TextTruncate: TextTruncate
Controls the truncation of the text displayed in the TextBox.
TextWrapped
TextBox.TextWrapped: boolean
Determines if text wraps to multiple lines within the TextBox element space, truncating excess text.
TextXAlignment
TextBox.TextXAlignment: TextXAlignment
Determines the horizontal alignment of the rendered text.
TextYAlignment
TextBox.TextYAlignment: TextYAlignment
Determines the vertical alignment of the rendered text.

メソッド(3)

名前と書き方説明
CaptureFocus
TextBox:CaptureFocus(): ()
Forces the client to focus on the TextBox.
IsFocused
TextBox:IsFocused(): boolean
Whether the TextBox currently has focus.
ReleaseFocus
TextBox:ReleaseFocus(submitted: boolean): ()
Forces the client to unfocus the TextBox.

イベント(3)

名前と書き方説明
Focused
TextBox.Focused()
Fires when the TextBox gains focus.
FocusLost
TextBox.FocusLost(enterPressed: boolean, inputThatCausedFocusLoss: InputObject)
Fires when the TextBox loses its focus.
ReturnPressedFromOnScreenKeyboard
TextBox.ReturnPressedFromOnScreenKeyboard()
Fires when the TextBox is focused and the player presses the on-screen keyboard's return/enter button.

受け継いでいるメンバー

GuiObject から受け継いでいるもの(42)

Active・AnchorPoint・AutomaticSize・BackgroundColor3・BackgroundTransparency・BorderColor3・BorderMode・BorderSizePixel・ClipsDescendants・GuiState・InputSink・Interactable・LayoutOrder・NextSelectionDown・NextSelectionLeft・NextSelectionRight・NextSelectionUp・Position・Rotation・Selectable・SelectionImageObject・SelectionOrder・Size・SizeConstraint・Visible・ZIndex・InputBegan・InputChanged・InputEnded・MouseEnter・MouseLeave・MouseMoved・MouseWheelBackward・MouseWheelForward・SelectionGained・SelectionLost・TouchLongPress・TouchPan・TouchPinch・TouchRotate・TouchSwipe・TouchTap

GuiBase2d から受け継いでいるもの(11)

AbsolutePosition・AbsoluteRotation・AbsoluteSize・AutoLocalize・RootLocalizationTable・SelectionBehaviorDown・SelectionBehaviorLeft・SelectionBehaviorRight・SelectionBehaviorUp・SelectionGroup・SelectionChanged

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(TextBox)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む