次の方法で共有


EDITBOX Element

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The EDITBOX element provides a way for users to enter text within a skin.

The EDITBOX element supports the following attributes.

Attribute Description
backgroundColor Specifies or retrieves the background color for the edit box control.
border Specifies or retrieves a value indicating whether the edit box control has a border.
editStyle Specifies or retrieves the style of the edit box control.
fontFace Specifies or retrieves the font used for text in the edit box control.
fontSize Specifies or retrieves the font size for the edit box control.
fontStyle Specifies or retrieves the font style for the edit box control.
foregroundColor Specifies or retrieves the text color in the edit box control.
justification Specifies or retrieves the alignment of the text within the edit box control.
lineCount Retrieves the number of lines in the edit box control.
readOnly Specifies or retrieves a value indicating whether text in the edit box control is read-only or can be edited.
textLimit Specifies or retrieves the maximum number of characters that the user can type in the edit box control.
value Specifies or retrieves the text that is displayed in the edit box control.
wordWrap Specifies or retrieves a value indicating whether word wrap is enabled in the edit box control.

 

The EDITBOX element supports the following methods.

Method Description
getLine Retrieves the text for the line with the specified index.
getLineFromChar Retrieves the line index for the specified character index.
getLineIndex Retrieves the character index for the specified line index.
getSelectionEnd Retrieves the ending position of the selected text in the edit box control.
getSelectionStart Retrieves the starting position of the selected text in the edit box control.
replaceSelection Replaces the current selection with the specified text.
setSelection Selects the text in the edit box control from the specified start index to the specified end index.

 

The EDITBOX element supports the ambient attributes and can implement all ambient event handlers with the exception of onclick. For more information, see Ambient Attributes and Ambient Event Handlers.

Note

This element requires Windows Media Player for Windows XP or later.

 

Skin Programming Reference