Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetFocus To ActiveX Control - Doesn't
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
SetFocus To ActiveX Control - Doesn't
Divers
Thread ID:
00604494
Message ID:
00604494
Vues:
76
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
Répondre
Fil
Voir

Click here to load this message in the networking platform