Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Incremental Search
Message
From
20/11/2000 12:32:47
 
 
To
20/11/2000 12:19:23
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00443622
Message ID:
00443701
Views:
8
>When i put this.requery in the list1.init(), nothing happened. When i added this.rowsource='alistsource' i saw all of the records (should I have not done that?) however, nothing is highlighted and nothing happens to the listbox when I continue to type in the textbox. Sorry to be such a pain but I do appreciate the help.

Check if EXACT is set ON.
Here's the code for a test form - copy/paste this into a prg and then just do the prg.
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN


**************************************************
*-- Form:         form1
*-- ParentClass:  form
*-- BaseClass:    form
*-- Time Stamp:   11/20/00 12:18:05 PM
*
DEFINE CLASS form1 AS form


  DataSession = 2
  Height = 241
  Width = 242
  DoCreate = .T.
  OLEDropMode = 1
  AutoCenter = .T.
  Caption = "Form1"
  Name = "Form1"
  DIMENSION avalues[1,1]
  DIMENSION asource[1,1]


  ADD OBJECT list1 AS listbox WITH ;
    RowSourceType = 5, ;
    RowSource = "thisform.asource", ;
    Height = 170, ;
    Left = 24, ;
    TabIndex = 2, ;
    Top = 47, ;
    Width = 192, ;
    Name = "List1"


  ADD OBJECT text1 AS textbox WITH ;
    Comment = "", ;
    Height = 23, ;
    Left = 24, ;
    TabIndex = 1, ;
    Top = 23, ;
    Width = 192, ;
    Name = "Text1"

  PROCEDURE Init
    SET EXACT OFF  
  ENDPROC

  PROCEDURE list1.Init
  LOCAL ji
  With thisform
    dimension .aSource(5,2)
    .asource[1,1] = "Bush"
    .asource[2,1] = "Buchanan"
    .asource[3,1] = "Gore"
    .asource[4,1] = "Nader"
    .asource[5,1] = "Goober"

    for ji = 1 to alen(.asource,1)
      .asource[ji,2]=upper(.asource[ji,1])
    endfor

    asort(.asource)
  EndWith

  this.rowsource = "thisform.asource"
  this.requery()
  ENDPROC


  PROCEDURE text1.InteractiveChange
  thisform.list1.listindex = ;
    ceiling(ascan(thisform.asource,allt(upper(this.value)))/2)
  ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform