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. Um.... Long Day Help

Um.... Long Day Help

Scheduled Pinned Locked Moved C#
helpquestion
3 Posts 3 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.
  • O Offline
    O Offline
    obelisk29
    wrote on last edited by
    #1

    How do I put this "( ) - " in a textBox lol..... ------------------ I'm naked under my clothes...

    B L 2 Replies Last reply
    0
    • O obelisk29

      How do I put this "( ) - " in a textBox lol..... ------------------ I'm naked under my clothes...

      B Offline
      B Offline
      bneacetp
      wrote on last edited by
      #2

      textBox.Text = "( ) - "; Is that what you mean? Happy Programming! WWW::CodeProject::BNEACETP

      1 Reply Last reply
      0
      • O obelisk29

        How do I put this "( ) - " in a textBox lol..... ------------------ I'm naked under my clothes...

        L Offline
        L Offline
        LongRange Shooter
        wrote on last edited by
        #3

        It must have been a really long day! I'm not sure what you are doing, but you have the answer in your question to some degree! A bit harder question would be how to put a "\" in a textbox! To apply your question to a possible development problem let's display numbers which will be contained in parenthesis and a "-" if the number is negative.

        private void SetNumber(TextBox displayArea, decimal balance)
        {
        displayArea.Text =
        balance >= 0 ? balance.ToString() : string.Format("( {0} )-", balance.ToString());
        }

        _____________________________________________ tagline under construction!

        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