Height of Controls

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vovan

    #1

    Height of Controls

    I need to place many controls on the form - Textboxes, DateTimePickers ,
    Combos.
    I'd like to line up them and put them as close as possible in the vertical
    direction. But due to different default heights of different controls
    (Textbox.Height = 20, Combobox.Height =21) I cannot do it.

    What properties of controls do I have to set first to allow to set the same
    heights for controls?

    Thank you

    vovan


  • Cor Ligthert[MVP]

    #2
    Re: Height of Controls

    Vovan,

    In the options you can set the used pixels of your IDE, probably this will
    be the way to reach your goal.

    Don't ask me where exact I never do this, I keep the let say standard
    distance between boxes, I don't want to be hated by the end users.

    Cor

    "vovan" <v@v.comschre ef in bericht
    news:e0vXnjCoIH A.804@TK2MSFTNG P05.phx.gbl...
    >I need to place many controls on the form - Textboxes, DateTimePickers ,
    >Combos.
    I'd like to line up them and put them as close as possible in the vertical
    direction. But due to different default heights of different controls
    (Textbox.Height = 20, Combobox.Height =21) I cannot do it.
    >
    What properties of controls do I have to set first to allow to set the
    same heights for controls?
    >
    Thank you
    >
    vovan
    >

    Comment

    • vovan

      #3
      Re: Height of Controls

      I need to have controls on the form located in 2 virtual columns and many
      virtual rows.
      Let's assume that in the first row I have 2 textboxes. So far everything's
      OK - their top and bottom properties are the same. I'm adding another row of
      controls - 2 textboxes. The distance bitween the bottom of the controls in
      the first row and top of the controls of the second row is the same. - Good.
      I add a third row with one textbox and 1 combo. Then the 4th row with
      controls. Now I have different space between the third and fourth row
      controls.
      And I wouldn't want to have it.

      Thank you

      "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
      news:B6704AB8-052A-4F1F-81DA-C9658D10C86F@mi crosoft.com...
      Vovan,
      >
      In the options you can set the used pixels of your IDE, probably this will
      be the way to reach your goal.
      >
      Don't ask me where exact I never do this, I keep the let say standard
      distance between boxes, I don't want to be hated by the end users.
      >
      Cor
      >
      "vovan" <v@v.comschre ef in bericht
      news:e0vXnjCoIH A.804@TK2MSFTNG P05.phx.gbl...
      >>I need to place many controls on the form - Textboxes, DateTimePickers ,
      >>Combos.
      >I'd like to line up them and put them as close as possible in the
      >vertical direction. But due to different default heights of different
      >controls (Textbox.Height = 20, Combobox.Height =21) I cannot do it.
      >>
      >What properties of controls do I have to set first to allow to set the
      >same heights for controls?
      >>
      >Thank you
      >>
      >vovan
      >>
      >

      Comment

      • Armin Zingler

        #4
        Re: Height of Controls

        "vovan" <v@v.comschri eb
        I need to have controls on the form located in 2 virtual columns and
        many virtual rows.
        Let's assume that in the first row I have 2 textboxes. So far
        everything's OK - their top and bottom properties are the same. I'm
        adding another row of controls - 2 textboxes. The distance bitween
        the bottom of the controls in the first row and top of the controls
        of the second row is the same. - Good. I add a third row with one
        textbox and 1 combo. Then the 4th row with controls. Now I have
        different space between the third and fourth row controls.
        And I wouldn't want to have it.
        After adding one row, use the height of the largest control in the row
        to calculate the top of the next row.


        Armin

        Comment

        • Lloyd Sheen

          #5
          Re: Height of Controls


          "Armin Zingler" <az.nospam@free net.dewrote in message
          news:ul7X3zJoIH A.4492@TK2MSFTN GP02.phx.gbl...
          "vovan" <v@v.comschri eb
          >I need to have controls on the form located in 2 virtual columns and
          >many virtual rows.
          >Let's assume that in the first row I have 2 textboxes. So far
          >everything's OK - their top and bottom properties are the same. I'm
          >adding another row of controls - 2 textboxes. The distance bitween
          >the bottom of the controls in the first row and top of the controls
          >of the second row is the same. - Good. I add a third row with one
          >textbox and 1 combo. Then the 4th row with controls. Now I have
          >different space between the third and fourth row controls.
          >And I wouldn't want to have it.
          >
          After adding one row, use the height of the largest control in the row to
          calculate the top of the next row.
          >
          >
          Armin
          >
          You can use the TableLayout control. Each time you want to add a new row
          there is a method for that and then you add the controls. It is a good way
          to keep the tops correct.

          LS

          Comment

          • Cor Ligthert[MVP]

            #6
            Re: Height of Controls

            Vovan,

            If you want it you can inherit all controls to build your own and paint by
            instance a nice thick border around those which are in your idea to small.

            Cor

            "vovan" <v@v.comschre ef in bericht
            news:%23brj7IJo IHA.5096@TK2MSF TNGP02.phx.gbl. ..
            >I need to have controls on the form located in 2 virtual columns and many
            >virtual rows.
            Let's assume that in the first row I have 2 textboxes. So far everything's
            OK - their top and bottom properties are the same. I'm adding another row
            of controls - 2 textboxes. The distance bitween the bottom of the controls
            in the first row and top of the controls of the second row is the same. -
            Good.
            I add a third row with one textbox and 1 combo. Then the 4th row with
            controls. Now I have different space between the third and fourth row
            controls.
            And I wouldn't want to have it.
            >
            Thank you
            >
            "Cor Ligthert[MVP]" <notmyfirstname @planet.nlwrote in message
            news:B6704AB8-052A-4F1F-81DA-C9658D10C86F@mi crosoft.com...
            >Vovan,
            >>
            >In the options you can set the used pixels of your IDE, probably this
            >will be the way to reach your goal.
            >>
            >Don't ask me where exact I never do this, I keep the let say standard
            >distance between boxes, I don't want to be hated by the end users.
            >>
            >Cor
            >>
            >"vovan" <v@v.comschre ef in bericht
            >news:e0vXnjCoI HA.804@TK2MSFTN GP05.phx.gbl...
            >>>I need to place many controls on the form - Textboxes, DateTimePickers ,
            >>>Combos.
            >>I'd like to line up them and put them as close as possible in the
            >>vertical direction. But due to different default heights of different
            >>controls (Textbox.Height = 20, Combobox.Height =21) I cannot do it.
            >>>
            >>What properties of controls do I have to set first to allow to set the
            >>same heights for controls?
            >>>
            >>Thank you
            >>>
            >>vovan
            >>>
            >>
            >
            >

            Comment

            • Armin Zingler

              #7
              Re: Height of Controls

              "Lloyd Sheen" <a@b.cschrieb
              After adding one row, use the height of the largest control in the
              row to calculate the top of the next row.


              Armin
              >
              You can use the TableLayout control. Each time you want to add a new
              row there is a method for that and then you add the controls. It is a
              good way to keep the tops correct.
              Yes, right, I forgot that. There are so many ways and components
              nowadays that I do not consider them all sometimes. :-)


              Armin

              Comment

              Working...