Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. graphicspath addstring problem

graphicspath addstring problem

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Try
    wrote on last edited by
    #1

    graphicsPath.AddString("sample", fontfamily, ..., ..., ...); graphic.DrawPath(pn, graphicsPath); I have added "sample" to addstring method while application is loading. As i proceed i require to change the name from "sample" to "Item". Can i change it? If yes, how?

    T Mike HankeyM 2 Replies Last reply
    0
    • T Try

      graphicsPath.AddString("sample", fontfamily, ..., ..., ...); graphic.DrawPath(pn, graphicsPath); I have added "sample" to addstring method while application is loading. As i proceed i require to change the name from "sample" to "Item". Can i change it? If yes, how?

      T Offline
      T Offline
      Try
      wrote on last edited by
      #2

      Even i used string variable but in vain..

      1 Reply Last reply
      0
      • T Try

        graphicsPath.AddString("sample", fontfamily, ..., ..., ...); graphic.DrawPath(pn, graphicsPath); I have added "sample" to addstring method while application is loading. As i proceed i require to change the name from "sample" to "Item". Can i change it? If yes, how?

        Mike HankeyM Offline
        Mike HankeyM Offline
        Mike Hankey
        wrote on last edited by
        #3

        I assume you are doing your drawing from either a somecontrol_Paint or OnPaint overriden method that gets drawn whenever the control gets invalidated. Therefore you can issue an control.Invalidate() and use replace the string with whatever. off the top of my head private void control_Paint(object sender, PaintEventArgs e) { string str = "sample"; if (!loading) str = "Item"; graphicsPath.AddString(str, fontfamily, ..., ..., ...); graphic.DrawPath(pn, graphicsPath); graphicsPath.Dispose(); pn.Dispose(); } then somewhere, relevent, in you code issue; isLoading = false; control.Invalidate(); Hope this helps, Mike

        Life is not measured by the number of breaths we take, but by the moments that take our breath away. "George Carlin

        Semper Fi http://www.hq4thmarinescomm.com[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups