Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox not refreshing
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows NT
Network:
Windows NT
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00953742
Message ID:
00956511
Views:
13
Hi Peter,

What's the data type the control is bound to?

Also they might be an alternative to the inKey() function why is it in there?

Regards


>I (think I) have a normal listbox. At first the selected item is beautifully refreshed when I choose another one from the dropped down list. But after some other action, that no longer happens, at least not without leaving the control. I can still select from the dropped down list, but the selected item won't immediately refresh.
>
>The code hereunder should demonstrate this. If the INKEY line is commented, then all continues to work fine.
>
>Is this a bug?
>
>
lox = createobject( 'form1' )
>lox.show()
>read events
>
>DEFINE CLASS form1 AS form
>
>	DoCreate = .T.
>	Caption = "Form1"
>	Name = "Form1"
>
>	ADD OBJECT cboText AS combobox WITH ;
>		FontBold = .T., ;
>		Height = 24, ;
>		Left = 78, ;
>		Style = 2, ;
>		Top = 42, ;
>		Width = 79, ;
>		Name = "cboText"
>
>	ADD OBJECT command1 AS commandbutton WITH ;
>		Top = 60, ;
>		Left = 234, ;
>		Height = 27, ;
>		Width = 84, ;
>		Cancel = .T., ;
>		Caption = "Exit", ;
>		Name = "Command1"
>
>
>	ADD OBJECT command2 AS commandbutton WITH ;
>		Top = 138, ;
>		Left = 132, ;
>		Height = 27, ;
>		Width = 84, ;
>		Caption = "Trouble", ;
>		Name = "Command2"
>
>
>	PROCEDURE cboText.Init
>		select text from _samples + 'solution\solution' into cursor c_sol
>
>		with this
>			.rowsourcetype = 2	&& alias
>			.rowsource     = 'c_sol'
>		endwith
>	ENDPROC
>
>	PROCEDURE command1.Click
>		thisform.release()
>		clear events
>	ENDPROC
>
>	PROCEDURE Destroy
>		use in select( 'c_sol' )
>	ENDPROC
>
>	PROCEDURE command2.Click
>		DEFINE Window Therm from 1,1 to 10,10
>		acti wind therm
>		=INKEY( 2 ), 'H' )	&& THIS IS THE (MOST) TROUBLESOME LINE
>		rele wind therm
>	ENDPROC
>
>ENDDEFINE
Mathias Banda

Time is longer than a rope.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform