Edytuj

Udostępnij za pośrednictwem


TrackBarRenderer.DrawHorizontalTicks Method

Definition

Draws the specified number of horizontal track bar ticks with visual styles.

public:
 static void DrawHorizontalTicks(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, int numTicks, System::Windows::Forms::VisualStyles::EdgeStyle edgeStyle);
public static void DrawHorizontalTicks (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, int numTicks, System.Windows.Forms.VisualStyles.EdgeStyle edgeStyle);
static member DrawHorizontalTicks : System.Drawing.Graphics * System.Drawing.Rectangle * int * System.Windows.Forms.VisualStyles.EdgeStyle -> unit
Public Shared Sub DrawHorizontalTicks (g As Graphics, bounds As Rectangle, numTicks As Integer, edgeStyle As EdgeStyle)

Parameters

g
Graphics

The Graphics used to draw the ticks.

bounds
Rectangle

The Rectangle that specifies the bounds of the ticks.

numTicks
Int32

The number of ticks to draw.

edgeStyle
EdgeStyle

One of the EdgeStyle values.

Exceptions

The operating system does not support visual styles.

-or-

Visual styles are disabled by the user in the operating system.

-or-

Visual styles are not applied to the client area of application windows.

Remarks

Before calling this method, you should verify that the value of the IsSupported property is true.

If width or height of the bounding rectangle or the number of ticks is less than or equal to zero, or g is null, DrawHorizontalTicks returns without rendering.

Applies to