SplitterCancelEventArgs.SplitY Özellik

Tanım

İstemci koordinatlarında sol üst köşesinin Y koordinatını SplitContainer alır veya ayarlar.

public:
 property int SplitY { int get(); void set(int value); };
public int SplitY { get; set; }
member this.SplitY : int with get, set
Public Property SplitY As Integer

Özellik Değeri

öğesinin sol üst köşesinin Y koordinatını SplitContainertemsil eden tamsayı.

Örnekler

Aşağıdaki kod örneğinde bu üyenin kullanımı gösterilmektedir. Örnekte, olay işleyicisi olayın oluşumunu SplitContainer.SplitterMoving raporlar. Bu rapor, olayın ne zaman gerçekleştiğini öğrenmenize yardımcı olur ve hata ayıklamada size yardımcı olabilir. Birden çok olayı veya sık gerçekleşen olayları raporlamak için, iletisini ile Console.WriteLine değiştirmeyi MessageBox.Show veya iletiyi çok satırlı TextBoxbir iletiye eklemeyi göz önünde bulundurun.

Örnek kodu çalıştırmak için, adlı SplitContainer1bir tür SplitContainer örneği içeren bir projeye yapıştırın. Ardından olay işleyicisinin olayla ilişkilendirildiğinden SplitContainer.SplitterMoving emin olun.

private void SplitContainer1_SplitterMoving(Object sender, SplitterCancelEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "MouseCursorX", e.MouseCursorX );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "MouseCursorY", e.MouseCursorY );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "SplitX", e.SplitX );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "SplitY", e.SplitY );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Cancel", e.Cancel );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "SplitterMoving Event" );
}
Private Sub SplitContainer1_SplitterMoving(sender as Object, e as SplitterCancelEventArgs) _ 
     Handles SplitContainer1.SplitterMoving

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "MouseCursorX", e.MouseCursorX)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "MouseCursorY", e.MouseCursorY)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "SplitX", e.SplitX)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "SplitY", e.SplitY)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Cancel", e.Cancel)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"SplitterMoving Event")

End Sub

Şunlara uygulanır