Table of Contents

Class PmpSlider

Namespace
Hymma.Solidworks.Addins
Assembly
Hymma.Solidworks.Addins.dll

a slider in property manager page

public class PmpSlider : PmpControl<IPropertyManagerPageSlider>, IWrapSolidworksObject<IPropertyManagerPageSlider>, IReleaseSolidworksObject
Inheritance
PmpControl<IPropertyManagerPageSlider>
PmpSlider
Implements
IWrapSolidworksObject<IPropertyManagerPageSlider>
Inherited Members

Constructors

PmpSlider(SliderStyles, string)

make a slider in the property manager page control

public PmpSlider(SliderStyles styles, string tip = "")

Parameters

styles SliderStyles

defines type of slider

tip string

Properties

Height

Height of slider control

public short Height { get; set; }

Property Value

short

Remarks

Normally you should not use this property because SOLIDWORKS will size the slider appropriately based on its orientation and display properties. However, the complexity of the PropertyManager page's layout may make it necessary to use this property with IPropertyManagerPageControl::Left, IPropertyManagerPageControl::Top, and IPropertyManagerPageControl::Width to get the desired look.
this property is also for creating a small slider by clearing the IPropertyManagerPageSlider::Style swPropMgrPageSliderStyle_AutoTicks bit and setting Height to a value less than the default. A horizontal slider without tick marks has a default height of 16. This height is in dialog-box units. You can convert this value to screen units (pixels) by using the Windows MapDialogRect function.

LineSize

Gets or sets how much the slider moves when the arrow keys are used to move the slider.

public int LineSize { get; set; }

Property Value

int

How much the slider moves when arrow keys are used to move the slider

Remarks

default is 1

PageSize

Gets or sets how much the slider moves when the Page Up or Page Down keys are used to move the slider.

public int PageSize { get; set; }

Property Value

int

Remarks

If this property is not used to specified how the slider moves when the Page Up or Page Down keys are used to move the slider, the value defaults to 2.

Position

Gets or sets the current position of the slider.

public int Position { get; set; }

Property Value

int

Remarks

If you do not set the initial position of a slider, then the value defaults to a position of 5.

Style

bitwise style as defined by SliderStyles

public SliderStyles Style { get; set; }

Property Value

SliderStyles

TickFrequency

Gets or sets the frequency of tick marks on a slider.

public int TickFrequency { get; set; }

Property Value

int

Methods

GetRange(out int, out int)

Gets the range of the slider.

public void GetRange(out int min, out int max)

Parameters

min int

Minimum range of slider

max int

Maximum range of slider

SetRange(int, int)

Sets the range of a slider.

public bool SetRange(int min, int max)

Parameters

min int

Minimum range of slider

max int

Maximum range of slider

Returns

bool

True if range is set false if not

UnsubscribeFromEvents()

unsubscribes from all events

public override void UnsubscribeFromEvents()

Events

PositionChanged

fires while the user changing the position of the slider

public event EventHandler<double> PositionChanged

Event Type

EventHandler<double>

TrackingCompleted

fires after the user has finished changing the position of the slider

public event EventHandler<double> TrackingCompleted

Event Type

EventHandler<double>