TextBoxクラス
ひとことで言うと
TextBoxは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。
公式の説明(英語):A 2D user interface element that displays player-editable text.
クラスの関係
受け継いでいるクラス:Object → Instance → GuiBase → GuiBase2d → GuiObject → TextBox
プロパティ(29)
| 名前と書き方 | 説明 |
|---|---|
ClearTextOnFocusTextBox.ClearTextOnFocus: boolean | Determines whether clicking on the TextBox will clear its TextBox.Text property. |
ContentTextTextBox.ContentText: string | A copy of TextBox.Text that contains exactly what is being rendered by the TextBox. |
CursorPositionTextBox.CursorPosition: int | Determines the offset of the text cursor in bytes, or -1 if there is no cursor. |
FontFaceTextBox.FontFace: Datatype.Font | Determines the font face used to render text. |
LineHeightTextBox.LineHeight: float | Scales the spacing between lines of text in the TextBox. |
MaxVisibleGraphemesTextBox.MaxVisibleGraphemes: int | The maximum number of graphemes the TextBox can show. |
MultiLineTextBox.MultiLine: boolean | When set to true, text inside a TextBox is able to move onto multiple lines. |
OpenTypeFeaturesTextBox.OpenTypeFeatures: string | Applies OpenType typographic features to the text rendered by the TextBox. |
OpenTypeFeaturesErrorTextBox.OpenTypeFeaturesError: string | Read-only property that describes why the TextBox.OpenTypeFeatures string could not be applied. |
PlaceholderColor3TextBox.PlaceholderColor3: Color3 | Sets the text color that gets used when no text has been entered into the TextBox. |
PlaceholderTextTextBox.PlaceholderText: string | Sets the text that gets displayed when no text has been entered into the TextBox. |
RichTextTextBox.RichText: boolean | Determines whether the TextBox renders the Class.TextBox.Text|Text string using rich text formatting. |
SelectionStartTextBox.SelectionStart: int | Determines the starting position of a text selection. |
ShowNativeInputTextBox.ShowNativeInput: boolean | If set to true, input native to the platform is used instead of Roblox's built-in keyboard. |
TextTextBox.Text: string | Determines the string rendered by the TextBox element. |
TextBoundsTextBox.TextBounds: Vector2 | The size of a TextBox element's text in offsets. |
TextColor3TextBox.TextColor3: Color3 | Determines the color of non-placeholder rendered text. |
TextDirectionTextBox.TextDirection: TextDirection | Direction in which the text is rendered. |
TextEditableTextBox.TextEditable: boolean | Determines whether the player can change the Class.TextBox.Text|Text. |
TextFitsTextBox.TextFits: boolean | Whether the text fits within the constraints of the TextBox. |
TextScaledTextBox.TextScaled: boolean | Changes whether text is resized to fit within the TextBox. |
TextSizeTextBox.TextSize: float | Determine the line height of text in offsets. |
TextStrokeColor3TextBox.TextStrokeColor3: Color3 | Determines the color of the text stroke (outline). |
TextStrokeTransparencyTextBox.TextStrokeTransparency: float | Determines the transparency of the text stroke (outline). |
TextTransparencyTextBox.TextTransparency: float | Determines the transparency of the rendered text. |
TextTruncateTextBox.TextTruncate: TextTruncate | Controls the truncation of the text displayed in the TextBox. |
TextWrappedTextBox.TextWrapped: boolean | Determines if text wraps to multiple lines within the TextBox element space, truncating excess text. |
TextXAlignmentTextBox.TextXAlignment: TextXAlignment | Determines the horizontal alignment of the rendered text. |
TextYAlignmentTextBox.TextYAlignment: TextYAlignment | Determines the vertical alignment of the rendered text. |
メソッド(3)
| 名前と書き方 | 説明 |
|---|---|
CaptureFocusTextBox:CaptureFocus(): () | Forces the client to focus on the TextBox. |
IsFocusedTextBox:IsFocused(): boolean | Whether the TextBox currently has focus. |
ReleaseFocusTextBox:ReleaseFocus(submitted: boolean): () | Forces the client to unfocus the TextBox. |
イベント(3)
| 名前と書き方 | 説明 |
|---|---|
FocusedTextBox.Focused() | Fires when the TextBox gains focus. |
FocusLostTextBox.FocusLost(enterPressed: boolean, inputThatCausedFocusLoss: InputObject) | Fires when the TextBox loses its focus. |
ReturnPressedFromOnScreenKeyboardTextBox.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)
英語の説明とメンバーの一覧は、Roblox Creator Documentation(TextBox)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。