EDIT:
I found this in the forms load method. The size is hard coded into form loaded, thus ignoring the size set in the designer. The panels are also being docked here, but are also anchored left,top. I do not know if that is an issue, but I removed the anchors.
How should I be handling the size of the window?
private void frmConnection_Load(object sender, EventArgs e)
{
this.Size = new Size(608, 377);
pnlConnection.Dock = DockStyle.Fill;
pnlDAQ.Dock = DockStyle.Fill;
pnlDAQ.Hide();
pnlNetFT.Dock = DockStyle.Fill;
pnlNetFT.Hide();
pnlWFT.Dock = DockStyle.Fill;
pnlWFT.Hide();
pnlSerialFT.Dock = DockStyle.Fill;
pnlSerialFT.Hide();
[...]
}
I am having trouble with overlapping items in winforms.
I was originally facing a dpi problem that was causing the other windows to overlap and have too large of text, but those seem to be fixed with an update to .NET Framework 4.8 and an addition to the app.config.
Now I am having trouble with this one window that is a host to multiple panels to navigate through a device setup. I have personally not worked with a window designed in this way before, so I believe that could be some of my problem with fixing this.
When running the program in ~96dpi, I get the overlapping. This is using the settings I used to replicate & fix the previous dpi problem described.
Here is the output I get when running the program Note that the logo scribbled out in red overlaps the text.
Here is how it appears in the designer, as well as showing how the panels are set up. It is 3x2 with 5 panels (last row last column spot empty)
Edit: I believe anchoring may be involved, but I am not well versed in anchoring, so advice is welcome.
Edit2: Here are the anchor positions for the panel I am trying to fix