Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Selection in ShapeListBox (Read 5179 times)
VT22
YaBB Newbies
*
Offline



Posts: 6
Joined: Jul 16th, 2010
Selection in ShapeListBox
Jul 20th, 2010 at 10:13am
Print Post  
Hi!

I found a bug: the shapelistbox does not select an item when the click on it is "not proper"( =the mouse moves between pressing and releasing the button). Then it does not send a shapeselected event, but the selection moves to the new item.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Selection in ShapeListBox
Reply #1 - Jul 20th, 2010 at 10:39am
Print Post  
Hi,

The control starts a drag-and-drop operation if the mouse moves more than SystemInformation.DragSize.Width pixels, and it seems after that the base ListBox doesn't call the OnSelectedIndexChanged method from which we raise ShapeSelected. If you don't need drag-and-drop support, we could add some property to let you disable it and then selection should work even if the mouse moves.

Stoyan
  
Back to top
 
IP Logged
 
VT22
YaBB Newbies
*
Offline



Posts: 6
Joined: Jul 16th, 2010
Re: Selection in ShapeListBox
Reply #2 - Jul 20th, 2010 at 3:48pm
Print Post  
I use drag'n'drop, so disabling won't help. I'd like to get an event when this improper click occurs, too. /I also tried mouseup, dragdrop, selectedindexchanged, but none of them works./

Also increasing Systeminformation.Dragsize would be good, is it possible?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Selection in ShapeListBox
Reply #3 - Jul 20th, 2010 at 5:20pm
Print Post  
SystemInformation.DragSize returns the values accessible through the GetSystemMetrics(SM_CXDRAG/YDRAG) Win32 function. I think they exists somewhere in the registry and can be changed using the TweakUI tool, but not through any standard Control Panel applet.

We'll see if we can make the standard selection operation complete successfully in that case for the next release. Maybe calling base.OnMouseUp after DoDragDrop will do that and raise the selection events; it depends on whether selection is implemented in the .NET BCL code or in the wrapped Win32 control.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint