ToolStripPanelRenderEventArgs.ToolStripPanel Vlastnost

Definice

Získá malování ToolStripPanel .

public:
 property System::Windows::Forms::ToolStripPanel ^ ToolStripPanel { System::Windows::Forms::ToolStripPanel ^ get(); };
public System.Windows.Forms.ToolStripPanel ToolStripPanel { get; }
member this.ToolStripPanel : System.Windows.Forms.ToolStripPanel
Public ReadOnly Property ToolStripPanel As ToolStripPanel

Hodnota vlastnosti

Malovat ToolStripPanel .

Příklady

Následující příklad kódu ukazuje použití tohoto člena. V příkladu obslužná rutina události hlásí výskyt ToolStripRenderer.RenderToolStripPanelBackground události. Tato sestava vám pomůže zjistit, kdy k události dojde, a může vám pomoct s laděním.

Pokud chcete spustit ukázkový kód, vložte ho do projektu, který obsahuje instanci typu, která dědí z ToolStripRenderer, například nebo ToolStripSystemRendererToolStripProfessionalRenderer. Potom pojmenujte instanci ToolStripRenderer1 a ujistěte se, že obslužná rutina události je přidružená k ToolStripRenderer.RenderToolStripPanelBackground události.

private void ToolStripRenderer1_RenderToolStripPanelBackground(Object sender, ToolStripPanelRenderEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "Graphics", e.Graphics );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ToolStripPanel", e.ToolStripPanel );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Handled", e.Handled );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "RenderToolStripPanelBackground Event" );
}
Private Sub ToolStripRenderer1_RenderToolStripPanelBackground(sender as Object, e as ToolStripPanelRenderEventArgs) _ 
     Handles ToolStripRenderer1.RenderToolStripPanelBackground

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "Graphics", e.Graphics)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "ToolStripPanel", e.ToolStripPanel)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Handled", e.Handled)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"RenderToolStripPanelBackground Event")

End Sub

Platí pro