Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SetFocus To ActiveX Control - Doesn't
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
SetFocus To ActiveX Control - Doesn't
Miscellaneous
Thread ID:
00604494
Message ID:
00604494
Views:
70
In the following method code, the FindItem method on the ActiveX ListView
is finding the string I pass in, but the SetFocus at the bottom has no
effect. Anyknow know what to do?



PROCEUDRE Lookup
LPARAMETERS cTextToFind

  LOCAL oItem
  oItem = NULL

  WITH ThisForm

    ** Trim the string to find
    cTextToFind = UPPER(ALLTRIM(cTextToFind))

    ** Search by the 1st column
    oItem = .oleListView.FindItem(cTextToFind,0,,1)

    ** If not found, search all other columns
    IF ISNULL(oItem)
      oItem = .oleListView.FindItem(cTextToFind,1,,1)
    ENDIF

    IF NOT ISNULL(oItem)
      oItem.EnsureVisible()
      .oleListView.SetFocus()
    ENDIF

  ENDWITH

RETURN
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Reply
Map
View

Click here to load this message in the networking platform