Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Scrolling a combo box using scrollbar button is unreliab
Message
 
 
To
15/01/2008 08:06:54
Richard Candeland
Richard Candeland Software Services
Keighley, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01281871
Message ID:
01281951
Views:
30
I was looking for something else, but found this thread Re: Problem with combobox and ignored clicks Thread #1123877 Message #1123989 which may be somehow related.

>I use combo boxes a lot with multiple columns. Often the total width of my columns is wider than the width of the text-box part of the combo box.
>
>These work fine except for the following situation. Drop the combo box with the mouse, grab the button in the scroll bar and scroll it down, carelessly allowing the mouse to stray to the right of the scollbar before letting go of the button. Select one of the newly visible values from the drop portion of the combo box by clicking on it with the mouse.
>
>None of the combo boxes events fire - not the click, not the interactivechange. Nothing. Click on any blank bit of the form and only then do these events fire.
>
>Experimentation seems to show that this is only a problem:
>- when the total width of the columns exceeds the width of the combo-box control
>- when the mouse is to the right of the scrollbar when the mouse button is released
>- when the combo-box scrollbar is still within it's parent screen. If the combobox has stretched outside the parent screen then the problem does not seem to arise.
>
>This first started to give me a headache on a new app I'm half way through implementing on VFP9 SP1. I've upgraded to SP2 and it's still a problem. I've also recreated it in VFP 8 SP1, so it's been around a while.
>
>Does anyone have any suggestions as to how to get round this? (Other than to tell my users to be more careful with the scrollbar or to change my screen layouts so that total width of the columns is always less than the width of the combo-box control.)
>
>The following test form shows the behaviour I described above (but if you change the column widths to either 20,20 or 100,100 the problem goes away):
>
>**************************************************
>*-- Form:         form1 (c:\program files\microsoft visual foxpro 8\test2.scx)
>*-- ParentClass:  form
>*-- BaseClass:    form
>*-- Time Stamp:   01/15/08 12:10:12 PM
>*
>DEFINE CLASS form1 AS form
>
>
>	Top = 0
>	Left = 0
>	Height = 84
>	Width = 324
>	DoCreate = .T.
>	Caption = "Form1"
>	Name = "Form1"
>
>
>	ADD OBJECT label1 AS label WITH ;
>		AutoSize = .T., ;
>		Caption = "Select a  value", ;
>		Height = 17, ;
>		Left = 24, ;
>		Top = 12, ;
>		Width = 81, ;
>		Name = "Label1"
>
>
>	ADD OBJECT combo1 AS combobox WITH ;
>		ColumnCount = 2, ;
>		ColumnWidths = "50,50", ;
>		RowSourceType = 1, ;
>		RowSource = "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20", ;
>		Height = 24, ;
>		Left = 120, ;
>		Top = 12, ;
>		Width = 48, ;
>		Name = "Combo1"
>
>
>	ADD OBJECT command1 AS commandbutton WITH ;
>		Top = 12, ;
>		Left = 228, ;
>		Height = 27, ;
>		Width = 84, ;
>		Caption = "Close", ;
>		Name = "Command1"
>
>
>	ADD OBJECT label2 AS label WITH ;
>		AutoSize = .T., ;
>		Caption = "Value selected", ;
>		Height = 17, ;
>		Left = 24, ;
>		Top = 48, ;
>		Width = 83, ;
>		Name = "Label2"
>
>
>	ADD OBJECT text1 AS textbox WITH ;
>		Enabled = .F., ;
>		Height = 23, ;
>		Left = 120, ;
>		Top = 48, ;
>		Width = 100, ;
>		Name = "Text1"
>
>
>	PROCEDURE combo1.InteractiveChange
>		WITH THISFORM.Text1
>		  .Value = THIS.Value
>		  .Refresh()
>		ENDWITH
>	ENDPROC
>
>
>	PROCEDURE command1.Click
>		RELEASE THISFORM
>	ENDPROC
>
>
>ENDDEFINE
>*
>*-- EndDefine: form1
>**************************************************
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform