Changeset 5462 for trunk/sources
- Timestamp:
- 02/15/11 11:01:30 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.Designer.cs
r5445 r5462 66 66 // 67 67 this.viewsLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 68 this.viewsLabel.ContextMenuStrip = this.viewContextMenuStrip;69 68 this.viewsLabel.Image = HeuristicLab.Common.Resources.VSImageLibrary.Windows; 70 69 this.viewsLabel.Location = new System.Drawing.Point(211, 0); -
trunk/sources/HeuristicLab.MainForm.WindowsForms/3.3/ViewHost.cs
r5445 r5462 263 263 private bool startDragAndDrop; 264 264 private void viewsLabel_MouseDown(object sender, MouseEventArgs e) { 265 if (!Locked) { 265 if (e.Button == System.Windows.Forms.MouseButtons.Right) { 266 Screen screen = Screen.FromControl(viewsLabel); 267 int rightBorder = viewsLabel.PointToScreen(viewsLabel.Location).X + viewContextMenuStrip.Width; // 268 rightBorder = rightBorder - screen.Bounds.X; //pixel position on active screen 269 270 if (rightBorder < screen.Bounds.Width) 271 viewContextMenuStrip.Show(viewsLabel, viewsLabel.Margin.Left, viewsLabel.Margin.Top); 272 else 273 viewContextMenuStrip.Show(screen.Bounds.X + screen.Bounds.Width - viewContextMenuStrip.Width, viewsLabel.PointToScreen(viewsLabel.Location).Y - viewsLabel.Margin.Top); 274 } else if (!Locked) { 266 275 startDragAndDrop = true; 267 276 viewsLabel.Capture = false;
Note: See TracChangeset
for help on using the changeset viewer.