# TextBox(ロブロックス クラス) > A 2D user interface element that displays player-editable text. - URL:https://roblox.minecraft-okinawa.com/reference/classes/TextBox/ - 公式:https://create.roblox.com/docs/reference/engine/classes/TextBox - 受け継いでいるクラス:GuiObject ## プロパティ - `TextBox.ClearTextOnFocus: boolean`:Determines whether clicking on the TextBox will clear its TextBox.Text property. - `TextBox.ContentText: string`:A copy of TextBox.Text that contains exactly what is being rendered by the TextBox. - `TextBox.CursorPosition: int`:Determines the offset of the text cursor in bytes, or -1 if there is no cursor. - `TextBox.FontFace: Datatype.Font`:Determines the font face used to render text. - `TextBox.LineHeight: float`:Scales the spacing between lines of text in the TextBox. - `TextBox.MaxVisibleGraphemes: int`:The maximum number of graphemes the TextBox can show. - `TextBox.MultiLine: boolean`:When set to true, text inside a TextBox is able to move onto multiple lines. - `TextBox.OpenTypeFeatures: string`:Applies OpenType typographic features to the text rendered by the TextBox. - `TextBox.OpenTypeFeaturesError: string`:Read-only property that describes why the TextBox.OpenTypeFeatures string could not be applied. - `TextBox.PlaceholderColor3: Color3`:Sets the text color that gets used when no text has been entered into the TextBox. - `TextBox.PlaceholderText: string`:Sets the text that gets displayed when no text has been entered into the TextBox. - `TextBox.RichText: boolean`:Determines whether the TextBox renders the Class.TextBox.Text|Text string using rich text formatting. - `TextBox.SelectionStart: int`:Determines the starting position of a text selection. - `TextBox.ShowNativeInput: boolean`:If set to true, input native to the platform is used instead of Roblox's built-in keyboard. - `TextBox.Text: string`:Determines the string rendered by the TextBox element. - `TextBox.TextBounds: Vector2`:The size of a TextBox element's text in offsets. - `TextBox.TextColor3: Color3`:Determines the color of non-placeholder rendered text. - `TextBox.TextDirection: TextDirection`:Direction in which the text is rendered. - `TextBox.TextEditable: boolean`:Determines whether the player can change the Class.TextBox.Text|Text. - `TextBox.TextFits: boolean`:Whether the text fits within the constraints of the TextBox. - `TextBox.TextScaled: boolean`:Changes whether text is resized to fit within the TextBox. - `TextBox.TextSize: float`:Determine the line height of text in offsets. - `TextBox.TextStrokeColor3: Color3`:Determines the color of the text stroke (outline). - `TextBox.TextStrokeTransparency: float`:Determines the transparency of the text stroke (outline). - `TextBox.TextTransparency: float`:Determines the transparency of the rendered text. - `TextBox.TextTruncate: TextTruncate`:Controls the truncation of the text displayed in the TextBox. - `TextBox.TextWrapped: boolean`:Determines if text wraps to multiple lines within the TextBox element space, truncating excess text. - `TextBox.TextXAlignment: TextXAlignment`:Determines the horizontal alignment of the rendered text. - `TextBox.TextYAlignment: TextYAlignment`:Determines the vertical alignment of the rendered text. ## メソッド - `TextBox:CaptureFocus(): ()`:Forces the client to focus on the TextBox. - `TextBox:IsFocused(): boolean`:Whether the TextBox currently has focus. - `TextBox:ReleaseFocus(submitted: boolean): ()`:Forces the client to unfocus the TextBox. ## イベント - `TextBox.Focused()`:Fires when the TextBox gains focus. - `TextBox.FocusLost(enterPressed: boolean, inputThatCausedFocusLoss: InputObject)`:Fires when the TextBox loses its focus. - `TextBox.ReturnPressedFromOnScreenKeyboard()`:Fires when the TextBox is focused and the player presses the on-screen keyboard's return/enter button. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)