0

With Windows Forms, I try to implement a UI to show some properties, and allow some to be edited. Properties are string key-value couples, defined when starting the dialog.

I began to implement it with horizontals FlowLayoutPanels in one big vertical FlowLayoutPanel, but the TextBoxes are not aligned:

enter image description here

So I tried with DataGridView, but I don't want keys to be editable, and it looks a bit awkward:

enter image description here

UPDATE: Tipped by SyncCircles, I tried the TableLayoutPanel, which is nicer (even though the columns are not resizable):

enter image description here

A very simplified version of Visual Studio's "Properties" window would be perfect.
Is there a component suited to what I am trying to accomplish?
If not, what is the usual way to do?

Community
  • 1
  • 1
Nicolas Raoul
  • 58,567
  • 58
  • 222
  • 373
  • 2
    The PropertyGrid control is the exact match for the VS Properties window. Just don't use a FlowLayoutPanel, use the snaplines in the designer to align controls. – Hans Passant Apr 11 '13 at 04:48
  • 1
    Have you tried `TableLayoutPanel`? Use row and column size property to make the desired layout.. – Pugazh Apr 11 '13 at 05:12

1 Answers1

2

Here is a design with TableLayoutPanel

enter image description here

Pugazh
  • 9,453
  • 5
  • 33
  • 54
  • Nice! Somehow when I build it it looks a bit different (see my question) Off-topic, but are columns resizable in this one? – Nicolas Raoul Apr 11 '13 at 07:37