Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo Box Undesirable Behavior
Message
From
20/06/2003 12:49:07
 
 
To
20/06/2003 12:26:39
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00802210
Message ID:
00802287
Views:
41
Hi Tracey,

Actually it was my partner who worked on this issue and he is moving into a new house today. I do recall that (it was within the past month) that the problem was confirmed by MS here on the UT but no word on a work around. So far, we have been able to fend off customer complaints by telling them they must move the mouse away from the combo box.

Assuming it had something to do with "mouse over" events we tried to capture that and keystrokes etc etc but.....

Search for messages from or to Alan Buch in the past month or so and perhaps there is a clue.


Ken

>You are the first one to see the same behavior at least so that is a start! What did you do to resolve it?
>
>>Hi Tracy,
>>
>>Yes we have seen that too. Two things... try it with the mouse pointer over the drop down list. Then try it with the mouse pointer moved away from the drop down list. Second, some of the wierd behavior happens once the number of items exceeds about 500.
>>
>>Ken
>>
>>
>>>I have created a form for testing purposes to simulate some undesireable behavior I am experiencing with a combobox. In the form below, if the user clicks on the combo box and then uses the arrow keys to scroll, the first couple of times the arrow keys scroll the list as it should, but periodically the value will show one thing while the hilighted selection in the list shows another and it behaves erratic. This happens periodically when the user presses the spacebar to expand the combobox also, yet sometimes it scrolls at it should. Any suggestions anyone?
>>>
>>>
>>>oform=CREATEOBJECT('frmcombobox')
>>>oform.show
>>>READ EVENTS
>>>RETURN
>>>
>>>DEFINE CLASS frmcombobox AS form
>>>
>>>
>>>	DoCreate = .T.
>>>	Caption = "Test Combo Box Form"
>>>	Name = "comboform"
>>>	DIMENSION alist[1,1]
>>>
>>>
>>>	ADD OBJECT cbocn_port AS combobox WITH ;
>>>		FontSize = 10, ;
>>>		RowSourceType = 2, ;
>>>		RowSource = "printers.cprinter", ;
>>>		Value = (" "), ;
>>>		ControlSource = "m.cn_port", ;
>>>		Height = 24, ;
>>>		ColumnLines = .T., ;
>>>		Left = 36, ;
>>>		SelectOnEntry = .T., ;
>>>		StatusBarText = "Press CTRL+0 (zero) to clear contents and leave blank.", ;
>>>		Style = 2, ;
>>>		TabIndex = 7, ;
>>>		ToolTipText = "Press F1 to select from all available printer type.", ;
>>>		Top = 24, ;
>>>		Width = 300, ;
>>>		Name = "cboCn_port"
>>>
>>>
>>>	ADD OBJECT button1 AS commandbutton WITH ;
>>>		FontSize = 10, ;
>>>		Caption = 'Close',;
>>>		Height = 27, ;
>>>		Left = 36,;
>>>		Top = 134,;
>>>		Name = 'cmdclose'
>>>
>>>	ADD OBJECT text1 AS textbox WITH ;
>>>		ControlSource = "m.cn_port", ;
>>>		Height = 23, ;
>>>		Left = 36, ;
>>>		ReadOnly = .T., ;
>>>		TabStop = .F., ;
>>>		Top = 84, ;
>>>		Width = 300, ;
>>>		Name = "Text1"
>>>
>>>
>>>	PROCEDURE Release
>>>		IF USED('PRINTERS')
>>>			USE IN PRINTERS
>>>		ENDIF
>>>		CLEAR EVENTS
>>>		DODEFAULT()
>>>	ENDPROC
>>>
>>>
>>>	PROCEDURE Load
>>>		IF TYPE('hdir')="U"
>>>			hdir = LEFT(SYS(2005),RAT("\",SYS(2005)))
>>>		ENDIF
>>>		PRIVATE lcalias
>>>		lcalias=""
>>>		lcalias=ALIAS()
>>>		PRIVATE myname
>>>		myname=hdir+'printers.dbf'
>>>		SET SAFETY OFF
>>>		SELE 0
>>>		CREATE TABLE (myname) (cprinter c(60))
>>>		IF !EMPTY(lcalias)
>>>			SELECT (lcalias)
>>>		ENDIF
>>>
>>>
>>>	PROCEDURE Init
>>>		IF TYPE('m.cn_port')="U"
>>>			PUBLIC m.cn_port
>>>			m.cn_port=""
>>>		ENDIF
>>>		*--Create an array with all windows printers
>>>		PRIVATE m.numOfPrinters
>>>		m.numOfPrinters = APRINTERS(printerList)
>>>		IF m.numOfPrinters  > 0
>>>			DIMENSION THIS.alist[Alen(printerlist, 1), 2]
>>>			LOCAL m.i
>>>			FOR m.i = 1 TO ALEN(printerList, 1)
>>>				LOCAL printerName
>>>				m.printerName=" "+printerList[m.i, 1]
>>>				* m.printerName = Strtran(printerList[m.i, 1], "\", " \")
>>>				THIS.alist[m.i, 1] = m.printerName
>>>			NEXT
>>>		ENDIF
>>>		*--Copy array to a local table for use in combobox picklists
>>>		PRIVATE lcalias
>>>		lcalias=""
>>>		lcalias=ALIAS()
>>>		SET SAFETY OFF
>>>		SELE 0
>>>		SELE printers
>>>		PRIVATE ia
>>>		FOR ia = 1 TO ALEN(THIS.alist,1)
>>>			SELE printers
>>>			APPEND BLANK
>>>			REPLACE printers.cprinter WITH THIS.alist(ia,1)
>>>		ENDFOR
>>>		IF !EMPTY(lcalias)
>>>			SELECT (lcalias)
>>>		ENDIF
>>>		**********************************************************
>>>	ENDPROC
>>>
>>>	PROCEDURE cmdclose.click
>>>		THISFORM.release
>>>	ENDPROC
>>>
>>>	PROCEDURE cbocn_port.LostFocus
>>>		ON KEY LABEL F1
>>>		IF ISNULL(THISFORM.cbocn_port.Value) .or. ISNULL(m.cn_port)
>>>			THISform.cbocn_port.Value=""
>>>			Thisform.cbocn_port.Refresh()
>>>			m.cn_port=thisform.cbocn_port.value
>>>		ENDIF
>>>		DODEFAULT()
>>>	ENDPROC
>>>
>>>
>>>	PROCEDURE cbocn_port.GotFocus
>>>		ON KEY LABEL SPACEBAR
>>>		ON KEY LABEL F1 KEYBOARD '{SPACEBAR}'
>>>		DODEFAULT()
>>>	ENDPROC
>>>
>>>
>>>	PROCEDURE cbocn_port.InteractiveChange
>>>		m.cn_port=this.value
>>>		THISFORM.text1.refresh
>>>		DODEFAULT()
>>>	ENDPROC
>>>
>>>
>>>ENDDEFINE
>>>*
>>>*-- EndDefine: frmcombobox
>>>**************************************************
>>>
Previous
Reply
Map
View

Click here to load this message in the networking platform