Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic ControlHostClick fires 2 X (Read 3464 times)
Kurt
YaBB Newbies
*
Offline


48°32'N 8°1'E

Posts: 10
Location: Germany
Joined: Oct 24th, 2005
ControlHostClick fires 2 X
Oct 24th, 2005 at 11:53am
Print Post  
The ControlHostClick event of the flowchart fires twice, when the controlhost hosts a combobox (appently once at MouseDown and once at MouseUp). Is this a bug? If not, how can I distinguish the two events?
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ControlHostClick fires 2 X
Reply #1 - Oct 24th, 2005 at 12:59pm
Print Post  
The ControlHostClick event is raised each time the MouseUp event of the hosted control is raised. So if you get ControlHostClick twice, probably the combo.MouseUp was fired twice.

However we tested this here and cannot reproduce this behavior with a System.Windows.Forms.ComboBox control. Do you use the standard .NET combo box or a third party one ?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ControlHostClick fires 2 X
Reply #2 - Oct 24th, 2005 at 1:01pm
Print Post  
and what's the ControlHost.HostMouseAction value ?
  
Back to top
 
IP Logged
 
Kurt
YaBB Newbies
*
Offline


48°32'N 8°1'E

Posts: 10
Location: Germany
Joined: Oct 24th, 2005
Re: ControlHostClick fires 2 X
Reply #3 - Oct 25th, 2005 at 6:00am
Print Post  
I use standard .NET 2.0 combo box.

The value of ControlHost.CtrlMouseAction = EHostMouseAction.hmaIgnoreControl. Only with this value the event fires twice. With hmaSelectHost all is ok.

I use hmaIgnoreControl, because with this value I can multiselect controls with CTRL+Left Mouseclick (this works fine with most controls, but not with LinkLabel and ListView).
  
Back to top
WWW  
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: ControlHostClick fires 2 X
Reply #4 - Oct 25th, 2005 at 6:29am
Print Post  
Ok I guess with hmaIgnoreControl the combo box could not be ignored successfully, e.g. the flowchart could not acquire the mouse capture from it. We will add some check for the hmaIgnoreControl value when handling the hosted control's MouseUp event.

Anyway we have already implemented multiple selection for control hosts using Ctrl+Click. That will be released with version 4 of FlowChart.NET in a couple of weeks, but I can send you our daily build of the dll if you need that sooner. Just drop a line to our support email address ...
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint