Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Whacky Listbox
Message
 
To
05/08/2005 11:45:50
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows 2000 SP4
Miscellaneous
Thread ID:
01038901
Message ID:
01038943
Views:
13
Looks like a bug in VFP9. It works in VFP8/7 as expected.


>I'd appreciate it if somebody would please try the following sample code and tell me if I'm crazy.
>
>First run it as is. Using the Scrollbar Thumb, scroll until the hilight is out of the picture. Then let go. Works as you expect?
>
>Now uncomment the commented code and do it again. Does the hilight bounce back into the visible part of the listbox? The Arrows and clicking on the scroll bar off the thumb work properly. Also, if you scroll using the thumb, but before you let go, move your mouse sideways off the scroll bar, then it works properly?
>
>Anybody know what's going on? I can't find this listed on MS's site anywhere, nor could I find it here anywhere. Is the only workaround not to have any 'When' code in the listbox?
>
>
>LOCAL oFrm as Frm
>
>oFrm = CREATEOBJECT('Frm')
>oFrm.Show(1)
>RETURN
>
>DEFINE CLASS frm AS form
>  Top = 0
>  Left = 0
>  Height = 209
>  Width = 261
>  Caption = "Form1"
>  WindowType = 1
>  listvalue = 10
>  Name = "Frm"
>
>  ADD OBJECT list1 AS listbox WITH ;
>    RowSourceType = 6, ;
>    RowSource = "ListData", ;
>    Value = 1, ;
>    ControlSource = "ThisForm.Listvalue", ;
>    Height = 132, ;
>    Left = 24, ;
>    Top = 36, ;
>    Width = 204, ;
>    Name = "List1"
>
>  PROCEDURE Load
>    LOCAL lcSafety
>    lcSafety = SET('Safety')
>    SET SAFETY OFF
>      CREATE TABLE ListData (Field1 C(5))
>      FOR x = 65 TO 90
>        INSERT INTO ListData (field1) VALUES (CHR(x))
>      ENDFOR
>    SET SAFETY &lcSafety
>  ENDPROC
>
>*!*    PROCEDURE List1.When
>*!*      RETURN ThisForm.Enabled
>*!*    ENDPROC
>
>ENDDEFINE
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform