Visual Basic (Declaration) | |
---|---|
Public Event Advance As AdvanceEventHandler |
Visual Basic (Usage) | Copy Code |
---|---|
Dim instance As FpSpread Dim handler As AdvanceEventHandler AddHandler instance.Advance, handler |
C# | |
---|---|
public event AdvanceEventHandler Advance |
The event handler receives an argument of type AdvanceEventArgs containing data related to this event. The following AdvanceEventArgs properties provide information specific to this event.
Property | Description |
---|---|
AdvanceNext | Gets whether to move to the next component. |
Cancel | Gets or sets whether to cancel default processing. |
This event occurs when the user moves the focus to the next or previous component on the form. This event occurs when the user performs one of the following actions:
- Presses the Tab key when the focus is in the lower-right (last) cell
- Presses Shift+Tab when the focus is in the upper-left (first) cell
- Presses the down arrow key when the focus is in the bottom (last) row
- Presses the up arrow key when the focus is in the top (first) row
- Presses the left arrow key when the focus is in the leftmost column of a row
- Presses the right arrow key when the focus is in the rightmost column of a row
The application responds by moving the focus to the next or previous component on the form.
This works as long as you have not overridden the default behavior of the Tab key. For more information on defining the Tab key, refer to information on the InputMap and action keys.
This event is raised by the OnAdvance method when the focus is advancing to the next item.
For more details on the individual event arguments, refer to AdvanceEventArgs members.
C# | Copy Code |
---|---|
private void fpSpread1_Advance(object sender, FarPoint.Win.Spread.AdvanceEventArgs e) { ListBox1.Items.Add("Advance event fired!"); } Label1.Text = "Click on a cell in the first row and press the UP arrow key." |
Visual Basic | Copy Code |
---|---|
Private Sub FpSpread1_Advance(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.AdvanceEventArgs) Handles FpSpread1.Advance ListBox1.Items.Add("Advance event fired!") End Sub Label1.Text = "Click on a cell in the first row and press the UP arrow key." |
Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8