解
製作自己的照片並將其指定為按鈕的圖標。首先,一個簡單的例子,你可以使用ms-paint來製作位圖
New Window( "hello", Button Box( "optional text", <<SETICON></SETICON>
Huge button icon without transparency沒有透明度的巨大按鈕圖標
您可能希望為可選文本設置一個空字符串,並且您可能需要更小的圖片。那張照片超過100x100。典型圖標為16x16或32x32。您還需要一個可以創建具有透明背景的.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帶有自定義圖標的按鈕