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. Implementing disabled text in a UserControl ? [modified]

Implementing disabled text in a UserControl ? [modified]

Scheduled Pinned Locked Moved C#
question
2 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.
  • L Offline
    L Offline
    LongRange Shooter
    wrote on last edited by
    #1

    I have a task to deploy a multistate treenode that will display disabled text if the user is not authorized to modify/view the contents of the treenode item. :suss: I have everything implemented. :cool: But I was wondering if anyone knows of the "standard" for displaying disabled text in a control. I assume first off that the text background color = the control background color. But what should the ForeColor be set to? SystemColors.? I was hoping there was a SystemColors.DisabledText.....but no luck. Has anyone done this?

    -- modified at 10:37 Friday 21st July, 2006

    A 1 Reply Last reply
    0
    • L LongRange Shooter

      I have a task to deploy a multistate treenode that will display disabled text if the user is not authorized to modify/view the contents of the treenode item. :suss: I have everything implemented. :cool: But I was wondering if anyone knows of the "standard" for displaying disabled text in a control. I assume first off that the text background color = the control background color. But what should the ForeColor be set to? SystemColors.? I was hoping there was a SystemColors.DisabledText.....but no luck. Has anyone done this?

      -- modified at 10:37 Friday 21st July, 2006

      A Offline
      A Offline
      atuldeore
      wrote on last edited by
      #2

      Try this

      System.Windows.Forms.ControlPaint.DrawStringDisabled()

      with color SystemColors.ControlLightLight or SystemColors.Control

      Every bit counts

      ADD

      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