Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm using a listbox to display status of a program that is running.

After an event I add a line of information to the listbox.

I'd like to make this a little bit easier to pick out specific information so I'd like to make some areas of text bold or possibly a different colour.

I'd even like to go as far as making a section of text in one of the lines in the listbox a different colour/bold to the rest of that line.

For example Host123 on network Failed

or Installation of Myprog on Host123 Completed Succesfully

I've seen a complicated solution that draws the listbox with some extra code but I was expecting there to be a simple way of formatting a strings colour, font etc a bit like html tags.

 

Any help would be great.

 

Cheers,

 

UG Guru

  • Leaders
Posted
Another option is the ListView control. In "details" view it looks very similar to a ListBox, but allows you to specify fonts and fore/backcolors. The downside is that it takes a little more work to code and it can't contain any type of object except ListViewItem objects (but you could assign their .Tag property to point to the object that they represent if it helps).
[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...