繁体   English   中英

C#中的OxyPlot对象的位置和大小没有响应

[英]Location and Size are not responding on an OxyPlot Object in C#

我似乎在固定图的位置和大小时遇到​​问题。 这是正常现象还是我缺少任何东西?

我的代码是这样的:

GPlot.Model = new PlotModel();
GPlot.Dock = DockStyle.Fill;
GPlot.Enabled = true;
GPlot.Parent = Top_Tabs.TabPages[2]; // Putting it on a Tab

// At this point the Location And Size of GPlot, are those of the containing parent

GPlot.Location = new System.Drawing.Point(279, 224);
GPlot.Size = new System.Drawing.Size(10, 10);

// Last Two lines had no effect.

this.Matlab.Controls.Add(GPlot);

谢谢

删除此行:

GPlot.Dock = DockStyle.Fill;

DockStyle.Fill意思是:设置控件的大小和位置,使其完全适合其父级的ClientRectangle。 它将忽略您手动设置的位置和大小。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM