Dart.PowerWEB.TextBox Namespace > HtmlBox Class : MouseEnter Event |
Occurs when the mouse pointer enters the PowerWEB control.
[Visual Basic]
<DescriptionAttribute("Event raised when the mouse pointer enters the control.")>
<CategoryAttribute("Action")>
Public Event MouseEnter() As LocationEventHandler
[C#]
[DescriptionAttribute("Event raised when the mouse pointer enters the control.")]
[CategoryAttribute("Action")]
public event LocationEventHandler MouseEnter();
[C++]
[DescriptionAttribute("Event raised when the mouse pointer enters the control.")]
[CategoryAttribute("Action")]
public: __event LocationEventHandler* MouseEnter();
[C++/CLI]
[DescriptionAttribute("Event raised when the mouse pointer enters the control.")]
[CategoryAttribute("Action")]
public:
event LocationEventHandler^ MouseEnter();
The event handler receives an argument of type LocationEventArgs containing data related to this event. The following LocationEventArgs properties provide information specific to this event.
Property | Description |
---|---|
X | Gets or sets the x-coordinate of the WebForm when the mouse is clicked. |
Y | Gets or sets the y-coordinate of the WebForm when the mouse is clicked. |
The MouseEnter event fires when the mouse pointer enters the PowerWEB control. MouseLeave will fire when the mouse pointer leaves the control.
The following example demonstrates PowerWEB events not found in other Server controls.
[Visual Basic]
'In this example, events fire as the user interacts with a PowerWEB Control
'These events are not found in non-PowerWEB Server controls
'When an event is raised, a PowerWEB control updates with a message
Private Sub PowerWEBControl1_ContextMenuChanged(ByVal sender As Object, ByVal e As LocationEventArgs) Handles PowerWEBControl1.ContextMenuChanged
PowerWEBControl1.Text = "You pressed the right button"
End Sub
Private Sub PowerWEBControl1_DoubleClick(ByVal sender As Object, ByVal e As LocationEventArgs) Handles PowerWEBControl1.DoubleClick
PowerWEBControl1.Text = "That was a nice double-click"
End Sub
Private Sub PowerWEBControl1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles PowerWEBControl1.GotFocus
PowerWEBControl1.Text = "I am focused"
End Sub
Private Sub PowerWEBControl1_HelpRequested(ByVal sender As Object, ByVal e As LocationEventArgs) Handles PowerWEBControl1.HelpRequested
PowerWEBControl1.Text = "You pressed F1 Need some help?"
End Sub
Private Sub PowerWEBControl1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles PowerWEBControl1.KeyDown
PowerWEBControl1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone down"
End Sub
Private Sub PowerWEBControl1_KeyPress(ByVal sender As Object, ByVal e As KeyEventArgs) Handles PowerWEBControl1.KeyPress
PowerWEBControl1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has been pressed"
End Sub
Private Sub PowerWEBControl1_KeyUp(ByVal sender As Object, ByVal e As KeyEventArgs) Handles PowerWEBControl1.KeyUp
PowerWEBControl1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() + " key has gone up"
End Sub
Private Sub PowerWEBControl1_LocationClick(ByVal sender As Object, ByVal e As LocationEventArgs) Handles PowerWEBControl1.LocationClick
PowerWEBControl1.Text = "The button was pressed at (" + e.X.ToString() + "," + e.Y.ToString() + ")"
End Sub
Private Sub PowerWEBControl1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles PowerWEBControl1.LostFocus
PowerWEBControl1.Text = "I'm losing focus"
End Sub
Private Sub PowerWEBControl1_MouseDown(ByVal sender As Object, ByVal e As LocationEventArgs) Handles PowerWEBControl1.MouseDown
PowerWEBControl1.Text = "Down goes the mouse button"
End Sub
Private Sub PowerWEBControl1_MouseEnter(ByVal sender As Object, ByVal e As LocationEventArgs) Handles PowerWEBControl1.MouseEnter
PowerWEBControl1.Text = "That tickles"
End Sub
Private Sub PowerWEBControl1_MouseLeave(ByVal sender As Object, ByVal e As LocationEventArgs) Handles PowerWEBControl1.MouseLeave
PowerWEBControl1.Text = "Come back"
End Sub
Private Sub PowerWEBControl1_MouseUp(ByVal sender As Object, ByVal e As LocationEventArgs) Handles PowerWEBControl1.MouseUp
PowerWEBControl1.Text = "Up goes the mouse button"
End Sub
[C#]
//In this example, events fire as the user interacts with a PowerWEB Control
//These events are not found in non-PowerWEB Server controls
//When an event is raised, a PowerWEB control updates with a message
private void PowerWEBControl1_ContextMenuChanged(object sender, LocationEventArgs e)
{
PowerWEBControl1.Text = "You pressed the right button!";
}
private void PowerWEBControl1_DoubleClick(object sender, LocationEventArgs e)
{
PowerWEBControl1.Text = "That was a nice double-click!";
}
private void PowerWEBControl1_GotFocus(object sender, System.EventArgs e)
{
PowerWEBControl1.Text = "I am focused!";
}
private void PowerWEBControl1_HelpRequested(object sender, LocationEventArgs e)
{
PowerWEBControl1.Text = "You pressed F1! Need some help?";
}
private void PowerWEBControl1_KeyDown(object sender, KeyEventArgs e)
{
PowerWEBControl1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() +
" key has gone down!";
}
private void PowerWEBControl1_KeyPress(object sender, KeyEventArgs e)
{
PowerWEBControl1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() +
" key has been pressed!";
}
private void PowerWEBControl1_KeyUp(object
sender, KeyEventArgs e)
{
PowerWEBControl1.Text = "The " + Convert.ToChar(e.KeyCode).ToString() +
" key has gone up!";
}
private void PowerWEBControl1_LocationClick(object sender, LocationEventArgs e)
{
PowerWEBControl1.Text = "The button was pressed at (" + e.X.ToString() +
"," + e.Y.ToString() + ")!";
}
private void PowerWEBControl1_LostFocus(object sender, System.EventArgs e)
{
PowerWEBControl1.Text = "I'm losing focus!";
}
private void PowerWEBControl1_MouseDown(object sender, LocationEventArgs e)
{
PowerWEBControl1.Text = "Down goes the mouse button!";
}
private void PowerWEBControl1_MouseEnter(object sender, LocationEventArgs e)
{
PowerWEBControl1.Text = "That tickles!";
}
private void PowerWEBControl1_MouseLeave(object sender, LocationEventArgs e)
{
PowerWEBControl1.Text = "Come back!";
}
private void PowerWEBControl1_MouseUp(object sender, LocationEventArgs e)
{
PowerWEBControl1.Text = "Up goes the mouse button!";
}
Platforms: Windows 98, Windows NT 4.0, Windows ME, Windows 2000, Windows XP, Windows Server 2003, Windows Vista
HtmlBox Class | HtmlBox Members
Send comments on this topic.
Documentation version 3.2.0.0.
© 2009 Dart Communications. All rights reserved.