Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TreeView Expand / NodeClick
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00707240
Message ID:
00708237
Views:
20
This message has been marked as the solution to the initial question of the thread.
If you are using VFP 6 or 7, program(-1) returns the current program call stack level. From that, you can check if the previous level is from the "RefreshForm" method... if so, DONT force the extra instance to call again, skip it...
Func RefreshForm
  ..
  ..
  Call to your NodeClick()...
  ..
  ..
EndFunc

Function NodeClick
  ..
  .. your other code
  ..
  ** See if this instance called from RefreshForm 1 level back
  IF ATC( "RefreshForm", program( program(-1) -1 ) ) = 0
    ** must be from user clicking or other...
    ** NOT from the Refresh form method... allow call
    RefreshForm()
  ENDIF

  ..
  ..
EndFunc
HTH
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform