Click here to Skip to main content
16,012,468 members
Home / Discussions / C#
   

C#

 
GeneralRe: Custom Control implementation at Runtime via Code vs. Designtime via Toolbox Pin
darkelv18-Jun-08 6:58
darkelv18-Jun-08 6:58 
AnswerRe: Custom Control implementation at Runtime via Code vs. Designtime via Toolbox Pin
rcaciopp18-Jun-08 7:26
rcaciopp18-Jun-08 7:26 
QuestionCulture independant Dates? Pin
Megidolaon18-Jun-08 3:59
Megidolaon18-Jun-08 3:59 
AnswerRe: Culture independant Dates? Pin
Luc Pattyn18-Jun-08 4:17
sitebuilderLuc Pattyn18-Jun-08 4:17 
AnswerRe: Culture independant Dates? Pin
PIEBALDconsult18-Jun-08 4:45
mvePIEBALDconsult18-Jun-08 4:45 
GeneralRe: Culture independant Dates? Pin
Megidolaon19-Jun-08 21:01
Megidolaon19-Jun-08 21:01 
Questionxcopy in post build event Pin
Russell Jones18-Jun-08 3:29
Russell Jones18-Jun-08 3:29 
QuestionListViewItem image overlay [modified] Pin
ajtunbridge18-Jun-08 2:59
ajtunbridge18-Jun-08 2:59 
Hi all. I'm trying to create a custom ListView where I can display an overlay image over an item. Basically, I'm creating a simple document management system and I want to be able to mark a document as obsolete or locked and then display an image over the documents' icon to inform the user. I've never really delved into UI programming before and I'm not too sure how to go about it. I've started off with a class derived from ListView, I've set the OwnerDraw property to true and subscribed to the DrawItem event. Where do I go from here?

Edit:

By the way, I've sussed out the drawing of the items image, it's only the text I'm having trouble with. I've got this so far

if (this.View != View.Details)
{
  if ((e.State & ListViewItemStates.Selected) != 0)
    e.DrawText(TextFormatFlags.Bottom | TextFormatFlags.GlyphOverhangPadding | TextFormatFlags.HorizontalCenter | TextFormatFlags.WordBreak);
  else
    e.DrawText(TextFormatFlags.Bottom | TextFormatFlags.HorizontalCenter | TextFormatFlags.EndEllipsis);
}


However, when I select an item, the text populates the whole of the items bounds. I want it to extend down past the item as it does in explorer.

modified on Wednesday, June 18, 2008 9:34 AM

AnswerRe: ListViewItem image overlay Pin
led mike18-Jun-08 5:24
led mike18-Jun-08 5:24 
GeneralRe: ListViewItem image overlay Pin
ajtunbridge18-Jun-08 5:48
ajtunbridge18-Jun-08 5:48 
Questionhow to check the database connected is readonly? Pin
nicolus18-Jun-08 2:46
nicolus18-Jun-08 2:46 
AnswerRe: how to check the database connected is readonly? Pin
Bert delaVega18-Jun-08 16:27
Bert delaVega18-Jun-08 16:27 
Questionfloat representation Pin
George_George18-Jun-08 2:24
George_George18-Jun-08 2:24 
AnswerRe: float representation Pin
Alan Balkany18-Jun-08 3:14
Alan Balkany18-Jun-08 3:14 
GeneralRe: float representation Pin
George_George18-Jun-08 3:29
George_George18-Jun-08 3:29 
GeneralRe: float representation Pin
Colin Angus Mackay18-Jun-08 3:34
Colin Angus Mackay18-Jun-08 3:34 
GeneralRe: float representation Pin
George_George18-Jun-08 3:46
George_George18-Jun-08 3:46 
AnswerRe: float representation Pin
CPallini18-Jun-08 3:32
mveCPallini18-Jun-08 3:32 
GeneralRe: float representation Pin
George_George18-Jun-08 3:43
George_George18-Jun-08 3:43 
GeneralRe: float representation Pin
Dan Neely18-Jun-08 3:46
Dan Neely18-Jun-08 3:46 
QuestionHow to Start FolderBrowserDialog to the middle of the screen ? Pin
Yanshof18-Jun-08 1:50
Yanshof18-Jun-08 1:50 
QuestionNot able to accomodate more number of lables Bar chart X-axix . It drops some of the labels :( ? Pin
BoboPupper18-Jun-08 1:48
BoboPupper18-Jun-08 1:48 
QuestionSending meeting request using Smtp Mail Pin
alok_2k318-Jun-08 1:29
alok_2k318-Jun-08 1:29 
AnswerRe: Sending meeting request using Smtp Mail Pin
vmtv28-Jun-10 0:43
vmtv28-Jun-10 0:43 
GeneralRe: Sending meeting request using Smtp Mail Pin
Mathew Chandy2-Feb-11 19:13
Mathew Chandy2-Feb-11 19:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.