問題
あなたはボタン上に特別な目的のアイコンが必要です。
溶液
あなた自身の写真を作り、ボタンのアイコンとしてそれらを指定してください。まず、ms-paintを使ってビットマップを作成する簡単な例です。
New Window( "hello", Button Box( "optional text", <<SETICON></SETICON>
Huge button icon without transparency透明のない巨大なボタンアイコン
あなたは、オプションのテキストのために空の文字列を持つことを望むかもしれません、そして、あなたはたぶんずっと小さい絵が欲しいでしょう。その写真は100×100以上です。一般的なアイコンは16 x 16または32 x 32です。透明な背景を持つ.pngファイルを作成できる描画プログラムも必要です。上のボタンは、白の背景にボタンの灰色の背景(テーマによっては灰色ではない場合があります)と衝突します。
これがJMPマーカーの写真を撮ってアイコンを作る例です。
// You'll need to restart JMP to see changes you make to the icon files
// because JMP caches them on first load and will not notice changes.
// (Or you can just make new names while testing, but that isn't a
// good idea for production code)
iconsize=16; // balance this with markersize, below
gridsize=200; // more than big enough for markers.
gridcenterX=gridsize/2+1; // may need +/- 1 or 2 for centering
gridcenterY=gridsize/2+2; // may need +/- 1 or 2 for centering
iconhalf=iconsize/2;
For( icon = 0, icon <= 31, icon++,
// make a graph of just this marker, centered
gb = Graph Box(
FrameSize( gridsize, gridsize ), //
Y Scale( 0, 2 ),
X Scale( 0, 2 ),
suppressaxes( 1 ),
Marker( icon, {1, 1} ),<<BACKGROUNDCOLOR></BACKGROUNDCOLOR>
Buttons with custom iconsカスタムアイコン付きのボタン