This is a migrated thread and some comments may be shown as answers.

how to make height of label and textbox equal

1 Answer 580 Views
Label
This is a migrated thread and some comments may be shown as answers.
Abhisek Shukla
Top achievements
Rank 1
Abhisek Shukla asked on 13 Sep 2007, 10:49 AM
In my application I have to place textbox in adjacent of label. i make bothe font size to 10. But when I am placing both together there is mismatching in height. When I placed one more combination of textbox and label one above another space is between them...How to remove that..

Abhisek Shukla

1 Answer, 1 is accepted

Sort by
0
Angel
Telerik team
answered on 15 Sep 2007, 12:42 PM
Hello Abhisek Shukla,

  1. It is normal that there is a difference in height between the two controls - Microsoft TextBox and Label also differ. Anyway, with our controls you can adjust all controls freely. For example suppose you use both controls with AutoSize set to true. For the TextBox set top and bottom Padding with values that will make the textbox with equal height according the label. If you don't like the color of the gradient - set its GradientStyle to Solid (for more information see the ticket "width of textbox control").
     
  2. There is default minimum space that Winforms puts between controls. This space is controlled by the property Margin of each control. That space is not obligatory - you can further modify the location of the control either via arrow keys on the keyboard or via setting the property Location. Anyway, it is easier just to set all fields of Margin for both controls to 0. In that case, you can place controls right next to each other via dragging.

Greetings,

Angel
the Telerik team


Instantly find answers to your questions at the new Telerik Support Center
Tags
Label
Asked by
Abhisek Shukla
Top achievements
Rank 1
Answers by
Angel
Telerik team
Share this question
or