4
試圖讓TableLayoutPanel中的某些標籤從其單元格的左上角移動到單元格的中心,我嘗試嘗試添加填充和/或利潤率。以編程方式爲標籤分配邊距和/或填充
但是,沒有我試過的作品。下面是我試過的代碼和結果:
// Setting the padding just cuts off the bottom part of the text
//lbl.Padding = new System.Windows.Forms.Padding(1);
// How to set Margin?
//lbl.Margin = new System.Windows.Forms.Margin(1); <- This mimics "Padding" but is not recognized
//lbl.Margin = new Thickness(6); <- This is the only example I could find, but it's for WPF
的問題是有關的WinForms,這看起來像JavaScript? – RoadieRich