Эффект увеличения панели с компонентом
I have a form with an panel A and a trackbar. Inside panel A, i have a second panel B, and inside that panel B there are many textbox. I need that when moving the trackbar, it decreases panel B with all the textbox that are included in it. I need that when moving the trackbar I increase the size of panel B, and all the components in it. As a Zoom effect. I try change font size of form, but it did not work. I use Visual Studio for it.
Что я уже пробовал:
private void trackBarMap_Scroll(object sender, EventArgs e) { float font = 14; float scroll = trackBarMapa.Value; float fontfinal = (font * scroll) / 100; panelB.Font = new Font("Microsoft Sans Serif", fontfinal); panelB.Height = (height * Convert.ToInt32(scroll)) / 100; panelB.Width = (width * Convert.ToInt32(scroll)) / 100; panelB.Refresh(); }
Gerry Schmitz
Вот почему вы должны использовать WPF, когда требуется "масштабирование".
https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.viewbox?view=net-5.0