14-08-14, 10:14 AM
اليك اخي الحل اولا في حالة تمدد التكست في سطر واحد
TextBox1.Width = TextBox1.PreferredSize.Width + 5
وكود الاخر في حالة استخدام اكثر من سطر
TextBox2.Multiline = True
TextBox2.WordWrap = False
TextBox2.Height = TextBox1.PreferredHeight
TextBox2.Width = TextBox2.PreferredSize.Width + 5
TextBox2.Height = TextBox2.PreferredSize.Height
ونحن في الخدمة
TextBox1.Width = TextBox1.PreferredSize.Width + 5
وكود الاخر في حالة استخدام اكثر من سطر
TextBox2.Multiline = True
TextBox2.WordWrap = False
TextBox2.Height = TextBox1.PreferredHeight
TextBox2.Width = TextBox2.PreferredSize.Width + 5
TextBox2.Height = TextBox2.PreferredSize.Height
ونحن في الخدمة
