We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Programmatically position a dockable OverviewControl

Thread ID:





45382 Jun 19,2006 06:48 PM UTC Jun 20,2006 07:47 PM UTC WinForms 3
Tags: Tools
Chris C
Asked On June 19, 2006 06:48 PM UTC

We have an applicaton that uses an OverviewControl and we would like to float the control and position it in a specific location when it is first made visible by the user. I looked at the SimpleCode sample and tried to something similar but it did not work for the OverviewControl. I modified the DiagramBuilder sample and had a similar problem. Here is the code that I changed in DiagramBuilder MainForm.cs private void barItemPanZoom_Click(object sender, System.EventArgs e) { if(this.barItemPanZoom.Checked == true) { // Hide the overview control this.dockingManager.SetDockVisibility(this.overviewControl1, false); this.barItemPanZoom.Checked = false; } else { // Initialize the OverviewControl with the active diagram''s Model & View and display the control if((this.ActiveDiagram != null) && (this.dockingManager.GetDockVisibility(this.overviewControl1) == false)) { this.dockingManager.SetDockVisibility(this.overviewControl1, true); // *** I added this call to FloatControl to position it at the top left of the main form. this.dockingManager.FloatControl(this.overviewControl1, new System.Drawing.Rectangle(this.Bounds.Left,this.Bounds.Top,300,300)); this.overviewControl1.Model = this.ActiveDiagram.Model; this.overviewControl1.View = this.ActiveDiagram.View; } this.barItemPanZoom.Checked = true; } } Can you please take a look and tell me what I''m doing wrong? We are currently using Thanks in advance for your help. Chris

Joy K George [Syncfusion]
Replied On June 19, 2006 08:56 PM UTC

Hi Chris, I was able to reproduc the situation.You may overcome this behaviour by using the following method. 1.Open the application in Designer view. 2.The Overview control will in floating state. 3.Dock that control to any side. 4.Run the application.And click on the baritem to float the control Please let me know,if this helped you. Regards, Joy

Chris C
Replied On June 20, 2006 06:47 PM UTC

Thank you for the suggestion. However, we would like to float the control programmatically. I found that the FloatControl method works if the control is currently docked. However, I would like to move the control programmatically even if it already floating, and that is not working. Thanks in advance for your help.

Joy K George [Syncfusion]
Replied On June 20, 2006 07:47 PM UTC

Hi Chris, You could move FloatingForms using the below method. if(dockingManager1.IsFloating(overviewControl1)){ FloatingForm ff=overviewControl1.Parent.Parent as FloatingForm;//FloatingForm is a form derived control ff.Location=new Point(this.Bounds.Left,this.Bounds.Top); } Please let me know, if this resolved your issue. Regards, Joy


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon