Table of Contents

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

standardIcon BitmapButtons
tip string

text 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

bitmap Bitmap

bitmap to edit and set in the property manager page

tip string

text for this button tooltip

iconSizes BtnSize

possible icons sizes for this button

opacity byte

define 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

standardIcon BitmapButtons

standard 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

bitmap Bitmap

bitmap to edit and set in the property manager page

fileName string

resultant bitmap file name on disk without extensions or directory

size BtnSize

size of the button

opacity byte

define 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