SplitContainer.SplitterRectangle SplitContainer.SplitterRectangle SplitContainer.SplitterRectangle SplitContainer.SplitterRectangle Property

定義

取得相對於 SplitContainer 之分隔器的大小和位置。Gets the size and location of the splitter relative to the SplitContainer.

public:
 property System::Drawing::Rectangle SplitterRectangle { System::Drawing::Rectangle get(); };
[System.ComponentModel.Browsable(false)]
public System.Drawing.Rectangle SplitterRectangle { get; }
member this.SplitterRectangle : System.Drawing.Rectangle
Public ReadOnly Property SplitterRectangle As Rectangle

屬性值

Rectangle,指定相對於 SplitContainer 之分隔器的大小和位置。A Rectangle that specifies the size and location of the splitter relative to the SplitContainer.

備註

使用SplitterRectangle來取得相對SplitContainer于之分隔器的寬度和高度。Use SplitterRectangle to get the width and height of the splitter relative to the SplitContainer. OnKeyDown、 、、OnMouseDown和事件處理常式會繪製SplitterRectangle ,以顯示正在移動之分割器的目前位置。 OnMouseMove OnMouseUp OnKeyUpThe OnKeyDown, OnKeyUp, OnMouseDown, OnMouseUp, and OnMouseMove event handlers draw the SplitterRectangle to show the current position of the splitter while it is moving.

SplitterRectangle值的意義會根據而有所不同OrientationThe meaning of the SplitterRectangle values vary depending on the Orientation. 的輸出SplitterRectangle格式{X, Y, Width, Height}為。The output of SplitterRectangle is in the format {X, Y, Width, Height}. 下表顯示垂直和水準SplitterRectangle分隔器的值意義。The following table shows the meaning of the SplitterRectangle values for vertical and horizontal splitters.

維度Dimension 垂直分隔器Vertical Splitter 水準分隔器Horizontal Splitter
XX 從左邊緣SplitContainer算起的分隔器距離(以圖元為單位)。The distance in pixels of the splitter from the left edge of the SplitContainer. 水準分隔器的這個值一律為0,表示分隔器會與的左邊緣SplitContainer排清。This value is always 0 for a horizontal splitter, indicating that the splitter is flush with the left edge of the SplitContainer.
YY 垂直分隔器的這個值一律為0,表示分隔器會與的上邊緣SplitContainer排清。This value is always 0 for a vertical splitter, indicating that the splitter is flush with the top edge of the SplitContainer. 分隔器與上邊緣SplitContainer之間的距離(以圖元為單位)。The distance in pixels of the splitter from the top edge of the SplitContainer.
寬度Width 分隔器的寬度。The width of the splitter. 分隔器的高度,相當於SplitContainer控制項的高度。The height of the splitter, which is equivalent to the height of the SplitContainer control.
高度Height 分隔器的高度,相當於SplitContainer控制項的高度。The height of the splitter, which is equivalent to the height of the SplitContainer control. 分隔器的寬度。The width of the splitter.

適用於

另請參閱