📜  windows froms textalign to middle of parent - 无论代码示例

📅  最后修改于: 2022-03-11 14:56:09.644000             🧑  作者: Mango

代码示例1
// To acchive this do the following steps:

// Set Label's 'AutoSize' property to False:
textbox1.AutoSize = false;

// TextAlign property to MiddleCenter 
textbox1.TextAlignment = ControlAlignment.MiddleCenter;

// and Dock property to Fill.
textbox1.Dock = DockStyle.Fill;