EN
이 콘텐츠는 한국어로 제공되지 않아 영어 버전으로 표시됩니다.
이 항목은 아직 평가되지 않았습니다.- 이 항목 평가

msSiteModeAddButtonStyle Method

New for Windows Internet Explorer 9

Defines an alternate icon image and tooltip for the specified button.

Syntax

pvarStyleID = window.external.msSiteModeAddButtonStyle(uiButtonID, bstrIconUrl [, pvarTooltip])

Parameters

uiButtonID Required. The ID of a button that is previously installed with msSiteModeAddThumbBarButton.
bstrIconUrl Required. An absolute or relative URI of an icon resource.
pvarTooltip Optional. A description of the button.

Return Value

Returns the ID of the new button style.

Possible Exceptions

Not implemented (0x80004001) This method is not supported on Windows CE.

Remarks

A button style consists of an additional icon and tooltip for a button position. The msSiteModeAddButtonStyle method only creates button styles; to apply them, call msSiteModeShowButtonStyle. The original icon and tooltip are automatically saved as Style 0 and do not need to be added again.

The button returns the same button ID no matter which button style is displayed. To perform the correct action, your application will need to retain the button state internally.

The icon is downloaded asynchronously. If the download fails, a blank button is used instead.

Example

The following script adds two button styles to btnPlayPause, which was created by a prior call to the msSiteModeAddThumbBarButton method.


function addButtonStyles()
{
    stylePlay = window.external.msSiteModeAddButtonStyle(btnPlayPause,
                'http://example.com/img/play.ico', 'Play');
    stylePause = window.external.msSiteModeAddButtonStyle(btnPlayPause,
                'http://example.com/img/pause.ico', 'Pause');
} 

Applies To

external

See Also

커뮤니티 추가 항목

추가
© 2013 Microsoft. All rights reserved.