この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

setCustomConsoleComponentButtonStyle()

ページに表示されるアプリケーションレベルのカスタムコンソールコンポーネントを起動するために使用する、ボタンのスタイルを設定します。このメソッドは、API バージョン 25.0 以降でのみ使用できます。

構文

1sforce.console.setCustomConsoleComponentButtonStyle(style:String, (optional)callback: Function)

引数

名前 説明
style string カスタムコンソールコンポーネントの起動に使用されるボタンのスタイル。サポートされるスタイルには、フォント、フォントの色、背景色などがあります。フォントとフォントの色は Internet Explorer® 7 では指定できません。
callback function メソッドの完了時にコールされる JavaScript メソッド。

サンプルコード – Visualforce

1swfobject.registerObject("clippy.codeblock-1", "9");
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17<apex:page>
18
19    <A HREF="#" onClick="testSetCustomConsoleComponentButtonStyle();return false">
20         Click here to set the style of a button used to launch a custom console component</A> 
21
22    <apex:includeScript value="/support/console/25.0/integration.js"/>
23    <script type="text/javascript">
24        function testSetCustomConsoleComponentButtonStyle() {
25            sforce.console.setCustomConsoleComponentButtonStyle('background:red;');
26        }
27    </script>
28</apex:page>

応答

このメソッドは非同期であるため、コールバックメソッドのオブジェクトで応答を返します。応答オブジェクトには次の項目が含まれます。

名前 説明
success boolean ボタンスタイルの設定に成功した場合は true、ボタンスタイルの設定に失敗した場合は false