how to make height of label and textbox equal

2 posts, 0 answers
  1. Abhisek Shukla
    Abhisek Shukla avatar
    23 posts
    Member since:
    Oct 2006

    Posted 13 Sep 2007 Link to this post

    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
  2. Angel
    Admin
    Angel avatar
    121 posts

    Posted 15 Sep 2007 Link to this post

    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
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top