Class IPmpControl
- Namespace
- Hymma.Solidworks.Addins
- Assembly
- Hymma.Solidworks.Addins.dll
a wrapper for solidworks property manager page controllers
public abstract class IPmpControl
- Inheritance
-
IPmpControl
- Derived
- Inherited Members
Properties
ActiveDoc
the solidworks document where the property manager page is displayed in. you can use this property before the property manager page is displayed
public ModelDoc2 ActiveDoc { get; }
Property Value
- ModelDoc2
Caption
a caption or title for this controller
public string Caption { get; }
Property Value
Control
property manager page control as an object
protected PropertyManagerPageControl Control { get; set; }
Property Value
- PropertyManagerPageControl
Enabled
enables or disables this property control on
public virtual bool Enabled { get; set; }
Property Value
Id
id of this controller which is used by SOLIDWORKS to identify it
public short Id { get; }
Property Value
Left
Left edge of the control
Use this property and Top to place controls side by side
The value is in dialog units relative to the group box that the control is in. The left edge of the group box is 0; the right edge of the group box is 100
public short Left { get; set; }
Property Value
Remarks
By default, the left edge of a control is either the left edge of its group box or indented a certain distance. this property overrides that default value
ResizeStyles
Gets or sets how to override the SOLIDWORKS default behavior when changing the width of a PropertyManager page.
Resize the PropertyManager page as defined in ControlResizeStyles
you can use ths property only before the control is displayed or while it is closed
public ControlResizeStyles ResizeStyles { get; set; }
Property Value
SharedIconsDir
this where the icon for this controller will be saved
public DirectoryInfo SharedIconsDir { get; set; }
Property Value
Tip
toolTip (hint) for this controller
public string Tip { get; set; }
Property Value
Top
Gets or sets the top edge of the control on a PropertyManager page
public short Top { get; set; }
Property Value
Remarks
returns -1 on error, MUST USE NUMERICAL VALUE TO SEE THE EFFECT
Type
type of this controller as defined in SolidWorks.Interop.swconst.swPropertyManagerPageControlType_e
public swPropertyManagerPageControlType_e Type { get; }
Property Value
- swPropertyManagerPageControlType_e
Visible
gets or sets the visibility of this control
public bool Visible { get; set; }
Property Value
Width
By default, the width of the control is usually set so that it extends to the right edge of its group box (not for buttons). Using this API overrides that default.
The value is in dialog units relative to the group box that the control is in. The width of the group box is 100
public short Width { get; set; }
Property Value
Methods
SetPictureLabel(Bitmap, string)
Sets the bitmap label for this control that appears next to it on the left hand side.
public void SetPictureLabel(Bitmap bitmap, string fileName)
Parameters
Remarks
You can only use this method on a PropertyManager page before the page is displayed, while it is displayed, or when it is closed.
The image will be resized to 18 x 18
ShowBubbleTooltip(string, string, Bitmap, string)
Displays a bubble ToolTip containing the specified title, message, and bitmap. A bubble ToolTip is useful for validating data typed or selected by users in controls on a PropertyManager page.
public void ShowBubbleTooltip(string title, string message, Bitmap bitmap, string fileName)
Parameters
titlestringTitle to display in bubble ToolTip
messagestringMessage to display in bubble ToolTip
bitmapBitmapbitmap object to use as icon in the tooltip
fileNamestringresultant bitmap file name on disk without extensions or directory
UnsubscribeFromEvents()
Unsubscribes all event handlers from this control events
public virtual void UnsubscribeFromEvents()
Events
Displaying
fired a moment before property manager page is displayed
public event EventHandler<PmpControlDisplayingEventArgs> Displaying
Event Type
GainedFocus
fired when user starts interacting with this control, such as start of typing in a text box
public event EventHandler<EventArgs> GainedFocus
Event Type
LostFocus
fires when user browses away from this control
public event EventHandler<EventArgs> LostFocus