解
制作自己的照片并将其指定为按钮的图标。首先,一个简单的例子,你可以使用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带有自定义图标的按钮