473,320 Members | 1,853 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Winforms formatting text issues

Hi,
I have a Winforms app (in C#.Net 2.) which has to display some relatively
long lists of information. Right now, I am just putting on the info on a
multiline label, one item per line. I would like to be able to do things like
adjust line spacing, make certain items bold and so forth. Is there an easy
way to do that?
I know I can use a Rich Text Box and I am also thinking about making each
item it's own label and adjusting it location programatically, but before I
start on either of those, I want to know if I am missing something...

Thanks!
Ethan
Sep 29 '08 #1
1 3189
"Ethan Strauss" <Et**********@discussions.microsoft.comwrote in message
news:74**********************************@microsof t.com...
I have a Winforms app (in C#.Net 2.) which has to display some
relatively
long lists of information. Right now, I am just putting on the info on a
multiline label, one item per line. I would like to be able to do things
like
adjust line spacing, make certain items bold and so forth. Is there an
easy
way to do that?
I know I can use a Rich Text Box and I am also thinking about making
each
item it's own label and adjusting it location programatically, but before
I
start on either of those, I want to know if I am missing something...
There's another possibility that you may consider:
In the form's Paint event, grab the e.Graphics parameter, and then
execute a series of e.Graphics.Drawstring(...) calls to paint all the lines
that you need to display. This gives you complete control on the spacing and
formatting of your info, just by playing with the parameters of DrawString.
Sep 29 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Dan Weeb | last post by:
Hi All, I have struggled through this far with help from many of you so thanks. I am stuck again. I am really new to this so don't be harsh :-) There are a few problems. You can run the script...
0
by: kk | last post by:
..NET Winforms Control for Spell and grammar check with formatting capabilitie ------------------------------------------------------------------------------------------- Need a control which has...
2
by: Eddy Bee | last post by:
Hi there, I'm encountering an inexplicable problem with page formatting in reports. Here's the easiest way to explain it: The Detail section of my report contains two elements: And let's...
2
by: Megan | last post by:
Can you write conditional VBA code that affects only one or two records on a continuous subform? I have a form with a subform on it. The parent/ child field that links the forms is CaseID. The...
0
by: Corky Whiteboard | last post by:
I have a Winforms treeview with subclassed treenodes. The treeview has "ShowNodeToolTips" set to true. The text is showing for each node, but it is not formatted 'pretty' - it comes out in one...
0
by: bdtmike | last post by:
I just installed VS2008 and have been working with my winform apps. I can't seem to get the formatting toolbar to become enabled while editing my winforms. Am I missing something? Has Microsoft...
10
by: sara | last post by:
Hi - I have a report that is 14 columnar sub-reports (Line up: Position- holders in each of our 14 locations - Manager, Assistant Manager, Receiving, Office, etc). I output directly to PDF...
1
by: dbuchanan | last post by:
I want to fill a textbox or a label or with lines from a listbox. I want to preserve the lline for line as it comes from the list box. I do not want the test to run-on. I suppose it is okay to wrap...
23
by: raylopez99 | last post by:
Here I am learning WinForms and two months into it I learn there's a WPF API that is coming out. Is this WPF out yet, and is it a threat to WinForms, in the sense that all the library routines I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.