Re: Stack over flow?
- From: "Steve Gerrard" <mynamehere@xxxxxxxxxxx>
- Date: Mon, 14 Apr 2008 20:08:02 -0700
rick-paulos@xxxxxxxxx wrote:
VB6
It looks to me that setting grid.rowsel is calling the sub (recursion)
Stands to reason, since the event handles selection changes.
and that causes the stack over flow.
Any alternative suggestions on how can I limit row selection to a
single row?
Below illustrates a generally useful way for blocking recursion on event
handlers.
Private Sub Grid_SelChange()
Static Busy As Boolean
If Not Busy Then
Busy = True
'reduce multi row select to single row
Grid.RowSel = Grid.Row
currentgridrow = Grid.Row
'update caption to show db stats & selected row
Mainform.Caption = version + racename + " - " +
EventName(currentevent) + " - " + Str(numberofentrants) + "/" +
Str(entrantsinevent) + " - " + Str(currentgridrow)
Busy = False
End If
End Sub
.
- Follow-Ups:
- Re: Stack over flow?
- From: Mike Williams
- Re: Stack over flow?
- References:
- Stack over flow?
- From: rick-paulos@xxxxxxxxx
- Stack over flow?
- Prev by Date: Stack over flow?
- Next by Date: Re: Stack over flow?
- Previous by thread: Stack over flow?
- Next by thread: Re: Stack over flow?
- Index(es):
Relevant Pages
|
|