Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic HostedCtrlMouseAction = IgnoreControl cannot work (Read 1454 times)
LongRunner
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 27th, 2006
HostedCtrlMouseAction = IgnoreControl cannot work
Nov 29th, 2006 at 1:26am
Print Post  
Hi,

I created a ControlHost to host a TabControl. Also, i set FlowChart.HostedCtrlMouseAction = IgnoreControl and ControlHostHandleStyle = EasyMove.
I guess i cannot change the TabPage through the ControlHost by clicking it, but it allow me to do that.
It is a good for me, however, the EasyMove seems cannot work properly. I can only move the ControlHost by the border.

private void button1_Click(object sender, System.EventArgs e)
{
ControlHost ch = this.fc.CreateControlHost(0, 0, 200, 200);

TabControl tab = new TabControl();
tab.TabPages.Add(new TabPage());
tab.TabPages.Add(new TabPage());
ch.Control = tab;
}


I seems cannot take the advantage of both. In fact, i need it. (Allow change TabPage only & EasyMove)
Any suggestion for me? Or Anything i missing in the setting?

Thanks
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: HostedCtrlMouseAction = IgnoreControl cannot w
Reply #1 - Nov 29th, 2006 at 5:55am
Print Post  
Hi,

The IgnoreControl property works only if the hosted control does not capture the mouse when the left button is pressed.

Furthermore, to detect mouse clicks over a hosted control, FlowChart.NET subscribes to the control's MouseDown and MouseUp events. However if there are some child controls inside, the mouse operations done on them won't be detected.

So you might need to override the tab control class and make sure its Capture = false before raising MouseDown. Also, handle the MouseMouseDown/Up events for all child controls and from the handler re-raise the event as if the tab control itself has been clicked.

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