1

When I set a TextBox dock style to Fill inside a TableLayoutPanel cell, only the width resizes while the height remains the same.

How do I make the height fill out the TableLayoutPanel's cell?

Jimi
  • 29,621
  • 8
  • 43
  • 61
wren
  • 373
  • 5
  • 15
  • 3
    Set its `MultiLine` property to true, coupled with a fixed `MaxLength`, if needed. The TLP `MinimumSize` can also help. Also, see the notes here: [How can I link a component's Size to the Window size?](https://stackoverflow.com/a/55829513/7444103). – Jimi May 16 '19 at 14:49
  • In questions related to UI components you should edit your question and add the relevant tags. For example `winforms` vs `wpf` – Cleptus May 16 '19 at 14:52
  • BTW: I think this is winforms because of `TableLayoutPanel` – Leo May 16 '19 at 14:58
  • @Jimi OH thanks haha cant believe i didnt think of that, i use multiline textbox all the time – wren May 17 '19 at 00:29
  • aw man guys dont mark my question as duplicate, i was searching for the answer on stack overflow too but i just cant find a question related to dockstyle, i think different ways of phrasing a question can help users find an answer easier – wren May 17 '19 at 00:35

1 Answers1

3

To do that you need to set MultiLine to true.

Leo
  • 5,013
  • 1
  • 28
  • 65