Results 1 to 4 of 4

Thread: GDI+ Text Question

  1. #1

    Thread Starter
    Hyperactive Member kleptos's Avatar
    Join Date
    Aug 2001
    Location
    The Dark Carnival
    Posts
    346

    GDI+ Text Question

    If i draw a rectangle and then draw some text in the middle of the rectangle, how can i remove the text and replace it? I am working on a progress bar, and as i update the text it seems to write on top of the last value, not remove and write. Any ideas? Thanks!
    ..::[kleptos]::..
    • Database Administrator (MSSQL 2000)
    • Application Developer (C#)
    • Web Developer (ASP.NET)


  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464

    Re: GDI+ Text Question

    Originally posted by kleptos
    If i draw a rectangle and then draw some text in the middle of the rectangle, how can i remove the text and replace it? I am working on a progress bar, and as i update the text it seems to write on top of the last value, not remove and write. Any ideas? Thanks!
    You can't really 'remove' it because it is all combined when it is painted to the screen (at least that is how I learned it in Java). What you can do is write over the text with the same text that is the same color as the background color. It will 'effectively' disappear. Then you can do other things.

  3. #3
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    why not override OnPaint and put a flag to set which text should appear?
    \m/\m/

  4. #4

    Thread Starter
    Hyperactive Member kleptos's Avatar
    Join Date
    Aug 2001
    Location
    The Dark Carnival
    Posts
    346
    why not override OnPaint and put a flag to set which text should appear?
    You wouldnt happen to have an example would you?
    ..::[kleptos]::..
    • Database Administrator (MSSQL 2000)
    • Application Developer (C#)
    • Web Developer (ASP.NET)


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width