Windows Form List & Text controls: Newbie Qs

  • Thread starter Thread starter Ethan Strauss
  • Start date Start date
E

Ethan Strauss

Hi,
I have just started building an application which is windows form based,
rather than web based, and I am having troubles with layout.
I can't find any control which gives me just a simple text list! There is
ListView, but that gives me very strange spacing, perhaps because it is
trying to put in icons? There are Flow and Table layout panels, but those
also give me strange spacing. I just want the Windows Form Equivalent of an
HTML <ul></UL> type list. I assume it is here somewhere, but I can't find it.
I have a similar problem with just displaying a Block of text which wraps
in a reasonable way. I have used a TextBox, set to MultiLine and with
background color set to background color, but that seems harder than it
should be. Is there any easier way?
I can't get a label to accept any sort of newline. I have tried "\n",
"<br>" and a few other things. Any thoughts?

I feel like I am probably missing something pretty fundamental. Anyone
know what it is?

Thanks!
Ethan
 
Ethan Strauss said:
Hi,
I have just started building an application which is windows form based,
rather than web based, and I am having troubles with layout.
I can't find any control which gives me just a simple text list! There
is
ListView, but that gives me very strange spacing, perhaps because it is
trying to put in icons? There are Flow and Table layout panels, but those
also give me strange spacing. I just want the Windows Form Equivalent of
an
HTML <ul></UL> type list. I assume it is here somewhere, but I can't find
it.
I have a similar problem with just displaying a Block of text which
wraps
in a reasonable way.

Listbox, Listview and Datagridview is it, unless you're using some 3rd party
controls. You'll need to figure out how to use the controls.
I have used a TextBox, set to MultiLine and with
background color set to background color, but that seems harder than it
should be. Is there any easier way?

It's not that hard. You can figure it out if you take the time to look
things up by using Google or something similar. Thed information is out
there with plenty of examples.
I can't get a label to accept any sort of newline. I have tried "\n",
"<br>" and a few other things. Any thoughts?

I feel like I am probably missing something pretty fundamental. Anyone
know what it is?

You should figure things out for desktop solutions and its form controls,
just like you figured out how to use the Web from and its controls.

It's not that hard.
 
also give me strange spacing. I just want the Windows Form Equivalent of an
HTML <ul></UL> type list.
I think ListView might help.
I have a similar problem with just displaying a Block of text which wraps
in a reasonable way. I have used a TextBox, set to MultiLine and with
background color set to background color, but that seems harder than it
should be. Is there any easier way?
I can't get a label to accept any sort of newline. I have tried "\n",
"<br>" and a few other things. Any thoughts?

TextBox + Multiline should help you display text that wraps

For newlines you can use Environment.NewLine which is "\r\n"
I feel like I am probably missing something pretty fundamental. Anyone
know what it is?
I am new to win forms myself. It doesnt take a long time to get a hang
of it. try browsing some sample projects(winforms). that should help..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top