Class PmpBitmapButton
- Namespace
- Hymma.Solidworks.Addins
- Assembly
- Hymma.Solidworks.Addins.dll
a bitmap button for property manager page
public class PmpBitmapButton : PmpButtonBase<PropertyManagerPageBitmapButton>, IWrapSolidworksObject<PropertyManagerPageBitmapButton>, IReleaseSolidworksObject
- Inheritance
-
PmpControl<PropertyManagerPageBitmapButton>PmpButtonBase<PropertyManagerPageBitmapButton>PmpBitmapButton
- Implements
-
IWrapSolidworksObject<PropertyManagerPageBitmapButton>
- Derived
- Inherited Members
Constructors
PmpBitmapButton(BitmapButtons, string)
generate a button with standard icons
public PmpBitmapButton(BitmapButtons standardIcon, string tip)
Parameters
standardIconBitmapButtonstipstringtext for this button tooltip
PmpBitmapButton(Bitmap, string, BtnSize, byte)
generate a button with specified Bitmap
public PmpBitmapButton(Bitmap bitmap, string tip, BtnSize iconSizes, byte opacity)
Parameters
bitmapBitmapbitmap to edit and set in the property manager page
tipstringtext for this button tooltip
iconSizesBtnSizepossible icons sizes for this button
opacitybytedefine opacity of the bitmap on the button, less values result in more transparent pictures. If the format of the Bitmap provided in .png no transparency will be applied on the image
Methods
SetButtonIcon(BitmapButtons)
assign an icon to this bitmap button from a list of standard solidworks icons
The not-clicked, clicked, and disabled states for the control are automatically set by the SOLIDWORKS application.
public void SetButtonIcon(BitmapButtons standardIcon)
Parameters
standardIconBitmapButtonsstandard icon as defined by BitmapButtons
SetButtonIcon(Bitmap, string, BtnSize, byte)
assign a bitmap to this bitmap button that appears on the button
Images should use:
256-color palette.
margin of at least 3 blank pixels on all sides of the image because this is where the button borders are drawn; i.e., any pixels in the image in these 3 outer rows and columns of pixels are obscured by the button borders.
public void SetButtonIcon(Bitmap bitmap, string fileName, BtnSize size, byte opacity)
Parameters
bitmapBitmapbitmap to edit and set in the property manager page
fileNamestringresultant bitmap file name on disk without extensions or directory
sizeBtnSizesize of the button
opacitybytedefine opacity of the bitmap on the button, less values result in more transparent pictures
Remarks
The rest of the images (selected, highlight regular, highlight selected, and disabled) for this button are automatically generated by SOLIDWORKS