Property SelectedWatch
SelectedWatch
Gets a currently selected watch expression.
[Browsable(false)]
public string SelectedWatch { get; }
Property Value
Examples
Here is how to use a SelectedWatch in the C# code:
using System;
using Alternet.Scripter.Debugger;
using Alternet.Scripter.Debugger.UI;
public partial class Form1 : Form
{
private Watches watchesControl;
private void Form1_Load(object sender, EventArgs e)
{
var debugger = new ScriptDebugger();
watchesControl = new Watches();
watchesControl.Dock = System.Windows.Forms.DockStyle.Fill;
watchesControl.Debugger = debugger;
}
private void Button_Click(object sender, EventArgs e)
{
Windows.Forms.MessageBox.Show(watchesControl.SelectedWatch);
}
}
Here is how to use a SelectedWatch in the Visual Basic code:
Imports System
Imports Alternet.Scripter.Debugger
Imports Alternet.Scripter.Debugger.UI
Partial Public Class Form1
Inherits Form
Private watchesControl As Watches
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim debugger = New ScriptDebugger()
watchesControl = New Watches()
watchesControl.Dock = Windows.Forms.DockStyle.Fill
watchesControl.Debugger = debugger
End Sub
Private Sub Button_Click(ByVal sender As Object, ByVal e As EventArgs)
Windows.Forms.MessageBox.Show(watchesControl.SelectedWatch)
End Sub
End Class
Remarks
The SelectedWatch property can be changed by clicking on the appropriate watch in the variable\expression list displayed by this control.