Equally outlining listbox values in C# with the PadLeft function

前端 未结 2 1543
旧巷少年郎
旧巷少年郎 2021-01-26 09:46

I am wrestling with my listbox and values in the listbox for some time now and I stumbled across another problem.

I am fetching data from my Access database (both the f

2条回答
  •  借酒劲吻你
    2021-01-26 10:20

    What you're experiencing is a result of the fact that the font is not "fixed width", so some characters are wider than other characters.

    The list box control is not really designed to display multiple columns, which is really what it seems like you are looking for here. I would suggest you use a System.Windows.Forms.DataGridView instead.

提交回复
热议问题