ToolStripRenderer クラス

定義

ToolStrip オブジェクトの描画機能を処理します。Handles the painting functionality for ToolStrip objects.

public ref class ToolStripRenderer abstract
public abstract class ToolStripRenderer
type ToolStripRenderer = class
Public MustInherit Class ToolStripRenderer
継承
ToolStripRenderer
派生

次のコード例は、カスタムの ToolStripRenderer クラスを実装する方法を示していますThe following code example demonstrates how to implement a custom ToolStripRenderer class. @No__t-0 クラスは、@no__t のコントロールの外観の3つの側面をカスタマイズします。 GridStrip border、ToolStripButton border、および ToolStripButton イメージです。The GridStripRenderer class customizes three aspects of the GridStrip control's appearance: GridStrip border, ToolStripButton border, and ToolStripButton image. 完全なコードリストについては、@no__t を参照してください。カスタム ToolStripRenderer @ no__t-0 を実装します。For a full code listing, see How to: Implement a Custom ToolStripRenderer.

// This class implements a custom ToolStripRenderer for the 
// GridStrip control. It customizes three aspects of the 
// GridStrip control's appearance: GridStrip border, 
// ToolStripButton border, and ToolStripButton image.
internal class GridStripRenderer : ToolStripRenderer
{   
    // The style of the empty cell's text.
    private static StringFormat style = new StringFormat();

    // The thickness (width or height) of a 
    // ToolStripButton control's border.
    static int borderThickness = 2;

    // The main bitmap that is the source for the 
    // subimagesthat are assigned to individual 
    // ToolStripButton controls.
    private Bitmap bmp = null;

    // The brush that paints the background of 
    // the GridStrip control.
    private Brush backgroundBrush = null;

    // This is the static constructor. It initializes the
    // StringFormat for drawing the text in the empty cell.
    static GridStripRenderer()
    {
        style.Alignment = StringAlignment.Center;
        style.LineAlignment = StringAlignment.Center;
    }

    // This method initializes the GridStripRenderer by
    // creating the image that is used as the source for
    // the individual button images.
    protected override void Initialize(ToolStrip ts)
    {
        base.Initialize(ts);

        this.InitializeBitmap(ts);
    }

    // This method initializes an individual ToolStripButton
    // control. It copies a subimage from the GridStripRenderer's
    // main image, according to the position and size of 
    // the ToolStripButton.
    protected override void InitializeItem(ToolStripItem item)
    {
        base.InitializeItem(item);

        GridStrip gs = item.Owner as GridStrip;

        // The empty cell does not receive a subimage.
        if ((item is ToolStripButton) &&
            (item != gs.EmptyCell))
        {
            // Copy the subimage from the appropriate 
            // part of the main image.
            Bitmap subImage = bmp.Clone(
                item.Bounds,
                PixelFormat.Undefined);

            // Assign the subimage to the ToolStripButton
            // control's Image property.
            item.Image = subImage;
        }
    }

    // This utility method creates the main image that
    // is the source for the subimages of the individual 
    // ToolStripButton controls.
    private void InitializeBitmap(ToolStrip toolStrip)
    {
        // Create the main bitmap, into which the image is drawn.
        this.bmp = new Bitmap(
            toolStrip.Size.Width,
            toolStrip.Size.Height);

        // Draw a fancy pattern. This could be any image or drawing.
        using (Graphics g = Graphics.FromImage(bmp))
        {
            // Draw smoothed lines.
            g.SmoothingMode = SmoothingMode.AntiAlias;
            
            // Draw the image. In this case, it is 
            // a number of concentric ellipses. 
            for (int i = 0; i < toolStrip.Size.Width; i += 8)
            {
                g.DrawEllipse(Pens.Blue, 0, 0, i, i);
            }
        }
    }

    // This method draws a border around the GridStrip control.
    protected override void OnRenderToolStripBorder(
        ToolStripRenderEventArgs e)
    {
        base.OnRenderToolStripBorder(e);

        ControlPaint.DrawFocusRectangle(
            e.Graphics,
            e.AffectedBounds,
            SystemColors.ControlDarkDark,
            SystemColors.ControlDarkDark);
    }

    // This method renders the GridStrip control's background.
    protected override void OnRenderToolStripBackground(
        ToolStripRenderEventArgs e)
    {
        base.OnRenderToolStripBackground(e);

        // This late initialization is a workaround. The gradient
        // depends on the bounds of the GridStrip control. The bounds 
        // are dependent on the layout engine, which hasn't fully
        // performed layout by the time the Initialize method runs.
        if (this.backgroundBrush == null)
        {
            this.backgroundBrush = new LinearGradientBrush(
               e.ToolStrip.ClientRectangle,
               SystemColors.ControlLightLight,
               SystemColors.ControlDark,
               90,
               true);
        }

        // Paint the GridStrip control's background.
        e.Graphics.FillRectangle(
            this.backgroundBrush, 
            e.AffectedBounds);
    }

    // This method draws a border around the button's image. If the background
    // to be rendered belongs to the empty cell, a string is drawn. Otherwise,
    // a border is drawn at the edges of the button.
    protected override void OnRenderButtonBackground(
        ToolStripItemRenderEventArgs e)
    {
        base.OnRenderButtonBackground(e);

        // Define some local variables for convenience.
        Graphics g = e.Graphics;
        GridStrip gs = e.ToolStrip as GridStrip;
        ToolStripButton gsb = e.Item as ToolStripButton;

        // Calculate the rectangle around which the border is painted.
        Rectangle imageRectangle = new Rectangle(
            borderThickness, 
            borderThickness, 
            e.Item.Width - 2 * borderThickness, 
            e.Item.Height - 2 * borderThickness);

        // If rendering the empty cell background, draw an 
        // explanatory string, centered in the ToolStripButton.
        if (gsb == gs.EmptyCell)
        {
            e.Graphics.DrawString(
                "Drag to here",
                gsb.Font, 
                SystemBrushes.ControlDarkDark,
                imageRectangle, style);
        }
        else
        {
            // If the button can be a drag source, paint its border red.
            // otherwise, paint its border a dark color.
            Brush b = gs.IsValidDragSource(gsb) ? b = 
                Brushes.Red : SystemBrushes.ControlDarkDark;

            // Draw the top segment of the border.
            Rectangle borderSegment = new Rectangle(
                0, 
                0, 
                e.Item.Width, 
                imageRectangle.Top);
            g.FillRectangle(b, borderSegment);

            // Draw the right segment.
            borderSegment = new Rectangle(
                imageRectangle.Right,
                0,
                e.Item.Bounds.Right - imageRectangle.Right,
                imageRectangle.Bottom);
            g.FillRectangle(b, borderSegment);

            // Draw the left segment.
            borderSegment = new Rectangle(
                0,
                0,
                imageRectangle.Left,
                e.Item.Height);
            g.FillRectangle(b, borderSegment);

            // Draw the bottom segment.
            borderSegment = new Rectangle(
                0,
                imageRectangle.Bottom,
                e.Item.Width,
                e.Item.Bounds.Bottom - imageRectangle.Bottom);
            g.FillRectangle(b, borderSegment);
        }
    }
}
' This class implements a custom ToolStripRenderer for the 
' GridStrip control. It customizes three aspects of the 
' GridStrip control's appearance: GridStrip border, 
' ToolStripButton border, and ToolStripButton image.
Friend Class GridStripRenderer
     Inherits ToolStripRenderer

   ' The style of the empty cell's text.
   Private Shared style As New StringFormat()
   
   ' The thickness (width or height) of a 
   ' ToolStripButton control's border.
   Private Shared borderThickness As Integer = 2
   
   ' The main bitmap that is the source for the 
   ' subimagesthat are assigned to individual 
   ' ToolStripButton controls.
   Private bmp As Bitmap = Nothing
   
   ' The brush that paints the background of 
   ' the GridStrip control.
   Private backgroundBrush As Brush = Nothing
   
   
   ' This is the static constructor. It initializes the
   ' StringFormat for drawing the text in the empty cell.
   Shared Sub New()
      style.Alignment = StringAlignment.Center
      style.LineAlignment = StringAlignment.Center
   End Sub 
   
   ' This method initializes the GridStripRenderer by
   ' creating the image that is used as the source for
   ' the individual button images.
   Protected Overrides Sub Initialize(ts As ToolStrip)
      MyBase.Initialize(ts)
      
      Me.InitializeBitmap(ts)
     End Sub

   ' This method initializes an individual ToolStripButton
   ' control. It copies a subimage from the GridStripRenderer's
   ' main image, according to the position and size of 
   ' the ToolStripButton.
   Protected Overrides Sub InitializeItem(item As ToolStripItem)
      MyBase.InitializeItem(item)
      
         Dim gs As GridStrip = item.Owner
      
      ' The empty cell does not receive a subimage.
         If ((TypeOf (item) Is ToolStripButton) And _
              (item IsNot gs.EmptyCell)) Then
             ' Copy the subimage from the appropriate 
             ' part of the main image.
             Dim subImage As Bitmap = bmp.Clone(item.Bounds, PixelFormat.Undefined)

             ' Assign the subimage to the ToolStripButton
             ' control's Image property.
             item.Image = subImage
         End If
   End Sub 

   ' This utility method creates the main image that
   ' is the source for the subimages of the individual 
   ' ToolStripButton controls.
   Private Sub InitializeBitmap(toolStrip As ToolStrip)
      ' Create the main bitmap, into which the image is drawn.
      Me.bmp = New Bitmap(toolStrip.Size.Width, toolStrip.Size.Height)
      
      ' Draw a fancy pattern. This could be any image or drawing.
      Dim g As Graphics = Graphics.FromImage(bmp)
      Try
         ' Draw smoothed lines.
         g.SmoothingMode = SmoothingMode.AntiAlias
         
         ' Draw the image. In this case, it is 
         ' a number of concentric ellipses. 
         Dim i As Integer
         For i = 0 To toolStrip.Size.Width - 8 Step 8
            g.DrawEllipse(Pens.Blue, 0, 0, i, i)
         Next i
      Finally
         g.Dispose()
      End Try
   End Sub 
   
   ' This method draws a border around the GridStrip control.
   Protected Overrides Sub OnRenderToolStripBorder(e As ToolStripRenderEventArgs)
      MyBase.OnRenderToolStripBorder(e)
      
      ControlPaint.DrawFocusRectangle(e.Graphics, e.AffectedBounds, SystemColors.ControlDarkDark, SystemColors.ControlDarkDark)
   End Sub 

   ' This method renders the GridStrip control's background.
   Protected Overrides Sub OnRenderToolStripBackground(e As ToolStripRenderEventArgs)
      MyBase.OnRenderToolStripBackground(e)
      
      ' This late initialization is a workaround. The gradient
      ' depends on the bounds of the GridStrip control. The bounds 
      ' are dependent on the layout engine, which hasn't fully
      ' performed layout by the time the Initialize method runs.
      If Me.backgroundBrush Is Nothing Then
         Me.backgroundBrush = New LinearGradientBrush(e.ToolStrip.ClientRectangle, SystemColors.ControlLightLight, SystemColors.ControlDark, 90, True)
      End If
      
      ' Paint the GridStrip control's background.
      e.Graphics.FillRectangle(Me.backgroundBrush, e.AffectedBounds)
     End Sub

   ' This method draws a border around the button's image. If the background
   ' to be rendered belongs to the empty cell, a string is drawn. Otherwise,
   ' a border is drawn at the edges of the button.
   Protected Overrides Sub OnRenderButtonBackground(e As ToolStripItemRenderEventArgs)
      MyBase.OnRenderButtonBackground(e)
      
      ' Define some local variables for convenience.
      Dim g As Graphics = e.Graphics
      Dim gs As GridStrip = e.ToolStrip 
      Dim gsb As ToolStripButton = e.Item 
      
      ' Calculate the rectangle around which the border is painted.
      Dim imageRectangle As New Rectangle(borderThickness, borderThickness, e.Item.Width - 2 * borderThickness, e.Item.Height - 2 * borderThickness)
      
      ' If rendering the empty cell background, draw an 
      ' explanatory string, centered in the ToolStripButton.
         If gsb Is gs.EmptyCell Then
             e.Graphics.DrawString("Drag to here", gsb.Font, SystemBrushes.ControlDarkDark, imageRectangle, style)
         Else
             ' If the button can be a drag source, paint its border red.
             ' otherwise, paint its border a dark color.
             Dim b As Brush = IIf(gs.IsValidDragSource(gsb), Brushes.Red, SystemBrushes.ControlDarkDark)

             ' Draw the top segment of the border.
             Dim borderSegment As New Rectangle(0, 0, e.Item.Width, imageRectangle.Top)
             g.FillRectangle(b, borderSegment)

             ' Draw the right segment.
             borderSegment = New Rectangle(imageRectangle.Right, 0, e.Item.Bounds.Right - imageRectangle.Right, imageRectangle.Bottom)
             g.FillRectangle(b, borderSegment)

             ' Draw the left segment.
             borderSegment = New Rectangle(0, 0, imageRectangle.Left, e.Item.Height)
             g.FillRectangle(b, borderSegment)

             ' Draw the bottom segment.
             borderSegment = New Rectangle(0, imageRectangle.Bottom, e.Item.Width, e.Item.Bounds.Bottom - imageRectangle.Bottom)
             g.FillRectangle(b, borderSegment)
         End If
     End Sub
 End Class

注釈

@No__t-0 クラスを使用して、特定のスタイルまたはテーマを ToolStrip に適用します。Use the ToolStripRenderer class to apply a particular style or theme to a ToolStrip. @No__t 0 とそれに含まれる @no__t オブジェクトをカスタム描画するのではなく、ToolStrip.Renderer プロパティを ToolStripRenderer から継承するオブジェクトに設定します。Rather than custom painting a ToolStrip and the ToolStripItem objects it contains, you set the ToolStrip.Renderer property to an object that inherits from ToolStripRenderer. @No__t-0 によって指定された描画は、ToolStrip、およびそれに含まれる項目に適用されます。The painting specified by the ToolStripRenderer is applied to the ToolStrip, as well as the items it contains.

@No__t 0 コントロールでカスタム描画を行うには、いくつかの方法があります。You can do custom painting in ToolStrip controls in several ways. 他の Windows フォームコントロールと同様に、ToolStripToolStripItem の両方に対して、オーバーライド可能な OnPaint メソッドと Paint のイベントがあります。As with other Windows Forms controls, the ToolStrip and ToolStripItem both have overridable OnPaint methods and Paint events. 通常の描画と同様に、座標系はコントロールのクライアント領域を基準としています。つまり、コントロールの左上隅は0、0です。As with regular painting, the coordinate system is relative to the client area of the control; that is, the upper left-hand corner of the control is 0, 0. @No__t 2 の @no__t 0 イベントと OnPaint メソッドは、他のコントロール描画イベントと同様に動作します。The Paint event and OnPaint method for a ToolStripItem behave like other control paint events.

@No__t-0 クラスには、背景、項目の背景、項目の画像、項目の矢印、項目のテキスト、および @no__t の境界線を描画するためのオーバーライド可能なメソッドがあります-1。The ToolStripRenderer class has overridable methods for painting the background, item background, item image, item arrow, item text, and border of the ToolStrip. これらのメソッドのイベント引数は、四角形、色、テキスト形式など、必要に応じて調整できるいくつかのプロパティを公開します。The event arguments for these methods expose several properties such as rectangles, colors, and text formats that you can adjust as desired.

項目を描画する方法のいくつかの側面だけを調整するには、通常、ToolStripRenderer をオーバーライドします。To adjust just a few aspects of how an item is painted, you typically override the ToolStripRenderer.

新しい項目を作成しているときに、描画のすべての側面を制御する場合は、OnPaint メソッドをオーバーライドします。If you are writing a new item and want to control all aspects of the painting, override the OnPaint method. @No__t-0 内から、ToolStripRenderer のメソッドを使用できます。From within OnPaint, you can use methods from the ToolStripRenderer.

既定では、OptimizedDoubleBuffer の設定を利用して、@no__t 0 がダブルバッファリングされます。By default, the ToolStrip is double buffered, taking advantage of the OptimizedDoubleBuffer setting.

コンストラクター

ToolStripRenderer()

ToolStripRenderer クラスの新しいインスタンスを初期化します。Initializes a new instance of the ToolStripRenderer class.

フィールド

Offset2X

x 軸に沿ってオフセットを 2 倍にするためのオフセット乗数を取得または設定します。Gets or sets the offset multiplier for twice the offset along the x-axis.

Offset2Y

y 軸に沿ってオフセットを 2 倍にするためのオフセット乗数を取得または設定します。Gets or sets the offset multiplier for twice the offset along the y axis.

メソッド

CreateDisabledImage(Image)

指定したイメージのグレースケールのコピーを作成します。Creates a gray-scale copy of a given image.

DrawArrow(ToolStripArrowRenderEventArgs)

ToolStripItem 上に矢印を描画します。Draws an arrow on a ToolStripItem.

DrawButtonBackground(ToolStripItemRenderEventArgs)

ToolStripButton の背景を描画します。Draws the background for a ToolStripButton.

DrawDropDownButtonBackground(ToolStripItemRenderEventArgs)

ToolStripDropDownButton の背景を描画します。Draws the background for a ToolStripDropDownButton.

DrawGrip(ToolStripGripRenderEventArgs)

ToolStrip に移動ハンドルを描画します。Draws a move handle on a ToolStrip.

DrawImageMargin(ToolStripRenderEventArgs)

ToolStrip 上のイメージの周りに空白を描画します。Draws the space around an image on a ToolStrip.

DrawItemBackground(ToolStripItemRenderEventArgs)

ToolStripItem の背景を描画します。Draws the background for a ToolStripItem.

DrawItemCheck(ToolStripItemImageRenderEventArgs)

ToolStripItem 上に、項目が選択されていることを示すイメージを描画します。Draws an image on a ToolStripItem that indicates the item is in a selected state.

DrawItemImage(ToolStripItemImageRenderEventArgs)

ToolStripItem 上にイメージを描画します。Draws an image on a ToolStripItem.

DrawItemText(ToolStripItemTextRenderEventArgs)

ToolStripItem 上にテキストを描画します。Draws text on a ToolStripItem.

DrawLabelBackground(ToolStripItemRenderEventArgs)

ToolStripLabel の背景を描画します。Draws the background for a ToolStripLabel.

DrawMenuItemBackground(ToolStripItemRenderEventArgs)

ToolStripMenuItem の背景を描画します。Draws the background for a ToolStripMenuItem.

DrawOverflowButtonBackground(ToolStripItemRenderEventArgs)

オーバーフロー ボタンの背景を描画します。Draws the background for an overflow button.

DrawSeparator(ToolStripSeparatorRenderEventArgs)

ToolStripSeparator を描画します。Draws a ToolStripSeparator.

DrawSplitButton(ToolStripItemRenderEventArgs)

ToolStripSplitButton を描画します。Draws a ToolStripSplitButton.

DrawStatusStripSizingGrip(ToolStripRenderEventArgs)

サイズ変更グリップを描画します。Draws a sizing grip.

DrawToolStripBackground(ToolStripRenderEventArgs)

ToolStrip の背景を描画します。Draws the background for a ToolStrip.

DrawToolStripBorder(ToolStripRenderEventArgs)

ToolStrip の境界線を描画します。Draws the border for a ToolStrip.

DrawToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs)

ToolStripContentPanel の背景を描画します。Draws the background of the ToolStripContentPanel.

DrawToolStripPanelBackground(ToolStripPanelRenderEventArgs)

ToolStripPanel の背景を描画します。Draws the background of the ToolStripPanel.

DrawToolStripStatusLabelBackground(ToolStripItemRenderEventArgs)

ToolStripStatusLabel の背景を描画します。Draws the background of the ToolStripStatusLabel.

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判定します。Determines whether the specified object is equal to the current object.

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。Serves as the default hash function.

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。Gets the Type of the current instance.

(継承元 Object)
Initialize(ToolStrip)

派生クラスでオーバーライドすると、特定の ToolStrip のカスタムの初期化処理を提供します。When overridden in a derived class, provides for custom initialization of the given ToolStrip.

InitializeContentPanel(ToolStripContentPanel)

指定した ToolStripContentPanel を初期化します。Initializes the specified ToolStripContentPanel.

InitializeItem(ToolStripItem)

派生クラスでオーバーライドすると、特定の ToolStripItem のカスタムの初期化処理を提供します。When overridden in a derived class, provides for custom initialization of the given ToolStripItem.

InitializePanel(ToolStripPanel)

指定した ToolStripPanel を初期化します。Initializes the specified ToolStripPanel.

MemberwiseClone()

現在の Object の簡易コピーを作成します。Creates a shallow copy of the current Object.

(継承元 Object)
OnRenderArrow(ToolStripArrowRenderEventArgs)

RenderArrow イベントを発生させます。Raises the RenderArrow event.

OnRenderButtonBackground(ToolStripItemRenderEventArgs)

RenderButtonBackground イベントを発生させます。Raises the RenderButtonBackground event.

OnRenderDropDownButtonBackground(ToolStripItemRenderEventArgs)

RenderDropDownButtonBackground イベントを発生させます。Raises the RenderDropDownButtonBackground event.

OnRenderGrip(ToolStripGripRenderEventArgs)

RenderGrip イベントを発生させます。Raises the RenderGrip event.

OnRenderImageMargin(ToolStripRenderEventArgs)

項目の背景を描画します。Draws the item background.

OnRenderItemBackground(ToolStripItemRenderEventArgs)

OnRenderItemBackground(ToolStripItemRenderEventArgs) イベントを発生させます。Raises the OnRenderItemBackground(ToolStripItemRenderEventArgs) event.

OnRenderItemCheck(ToolStripItemImageRenderEventArgs)

RenderItemCheck イベントを発生させます。Raises the RenderItemCheck event.

OnRenderItemImage(ToolStripItemImageRenderEventArgs)

RenderItemImage イベントを発生させます。Raises the RenderItemImage event.

OnRenderItemText(ToolStripItemTextRenderEventArgs)

RenderItemText イベントを発生させます。Raises the RenderItemText event.

OnRenderLabelBackground(ToolStripItemRenderEventArgs)

RenderLabelBackground イベントを発生させます。Raises the RenderLabelBackground event.

OnRenderMenuItemBackground(ToolStripItemRenderEventArgs)

RenderMenuItemBackground イベントを発生させます。Raises the RenderMenuItemBackground event.

OnRenderOverflowButtonBackground(ToolStripItemRenderEventArgs)

RenderOverflowButtonBackground イベントを発生させます。Raises the RenderOverflowButtonBackground event.

OnRenderSeparator(ToolStripSeparatorRenderEventArgs)

RenderSeparator イベントを発生させます。Raises the RenderSeparator event.

OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs)

OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs) イベントを発生させます。Raises the OnRenderSplitButtonBackground(ToolStripItemRenderEventArgs) event.

OnRenderStatusStripSizingGrip(ToolStripRenderEventArgs)

RenderStatusStripSizingGrip イベントを発生させます。Raises the RenderStatusStripSizingGrip event.

OnRenderToolStripBackground(ToolStripRenderEventArgs)

RenderToolStripBackground イベントを発生させます。Raises the RenderToolStripBackground event.

OnRenderToolStripBorder(ToolStripRenderEventArgs)

RenderToolStripBorder イベントを発生させます。Raises the RenderToolStripBorder event.

OnRenderToolStripContentPanelBackground(ToolStripContentPanelRenderEventArgs)

RenderToolStripContentPanelBackground イベントを発生させます。Raises the RenderToolStripContentPanelBackground event.

OnRenderToolStripPanelBackground(ToolStripPanelRenderEventArgs)

RenderToolStripPanelBackground イベントを発生させます。Raises the RenderToolStripPanelBackground event.

OnRenderToolStripStatusLabelBackground(ToolStripItemRenderEventArgs)

RenderToolStripStatusLabelBackground イベントを発生させます。Raises the RenderToolStripStatusLabelBackground event.

ScaleArrowOffsetsIfNeeded()

コンピューターの DPI 設定に基づいてスケーリングが求められる場合は、矢印アイコンのスケーリングに値 Offset2X および Offset2Y を適用します。Applies the Offset2X and Offset2Y values to scaling the arrow icon, if scaling is required based on the DPI settings of the computer.

ScaleArrowOffsetsIfNeeded(Int32)

指定した DPI 値に基づいて矢印アイコンのスケーリングに Offset2X および Offset2Y を適用します。Applies the Offset2X and Offset2Y values to scaling the arrow icon based on the specified DPI value.

ToString()

現在のオブジェクトを表す string を返します。Returns a string that represents the current object.

(継承元 Object)

イベント

RenderArrow

ToolStripItem 上の矢印が描画されたときに発生します。Occurs when an arrow on a ToolStripItem is rendered.

RenderButtonBackground

ToolStripButton の背景が描画されたときに発生します。Occurs when the background for a ToolStripButton is rendered.

RenderDropDownButtonBackground

ToolStripDropDownButton の背景が描画されたときに発生します。Occurs when the background for a ToolStripDropDownButton is rendered.

RenderGrip

ToolStrip の移動ハンドルが描画されたときに発生します。Occurs when the move handle for a ToolStrip is rendered.

RenderImageMargin

イメージとそのコンテナーとの間にマージンを描画します。Draws the margin between an image and its container.

RenderItemBackground

ToolStripItem の背景が描画されたときに発生します。Occurs when the background for a ToolStripItem is rendered.

RenderItemCheck

選択済みの ToolStripItem のイメージが描画されたときに発生します。Occurs when the image for a selected ToolStripItem is rendered.

RenderItemImage

ToolStripItem のイメージが描画されたときに発生します。Occurs when the image for a ToolStripItem is rendered.

RenderItemText

ToolStripItem のテキストが描画されたときに発生します。Occurs when the text for a ToolStripItem is rendered.

RenderLabelBackground

ToolStripLabel の背景が描画されたときに発生します。Occurs when the background for a ToolStripLabel is rendered.

RenderMenuItemBackground

ToolStripMenuItem の背景が描画されたときに発生します。Occurs when the background for a ToolStripMenuItem is rendered.

RenderOverflowButtonBackground

オーバーフロー ボタンの背景が描画されたときに発生します。Occurs when the background for an overflow button is rendered.

RenderSeparator

ToolStripSeparator が描画されたときに発生します。Occurs when a ToolStripSeparator is rendered.

RenderSplitButtonBackground

ToolStripSplitButton の背景が描画されたときに発生します。Occurs when the background for a ToolStripSplitButton is rendered.

RenderStatusStripSizingGrip

表示スタイルが変更されたときに発生します。Occurs when the display style changes.

RenderToolStripBackground

ToolStrip の背景が描画されたときに発生します。Occurs when the background for a ToolStrip is rendered.

RenderToolStripBorder

ToolStrip の境界線が描画されたときに発生します。Occurs when the border for a ToolStrip is rendered.

RenderToolStripContentPanelBackground

ToolStripContentPanel の背景を描画します。Draws the background of a ToolStripContentPanel.

RenderToolStripPanelBackground

ToolStripPanel の背景を描画します。Draws the background of a ToolStripPanel.

RenderToolStripStatusLabelBackground

ToolStripStatusLabel の背景を描画します。Draws the background of a ToolStripStatusLabel.

適用対象

こちらもご覧ください