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. Apply changes before input text (richtextbox)

Apply changes before input text (richtextbox)

Scheduled Pinned Locked Moved C#
csharpquestionwpf
4 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.
  • J Offline
    J Offline
    juliogyn
    wrote on last edited by
    #1

    Hi, i'm making text editor in c# with wpf. The editor apply changes (bold, italic, fontsize) only text selected for user. how can I make the change occurs before typing the text in editor ?! Tnks

    B 1 Reply Last reply
    0
    • J juliogyn

      Hi, i'm making text editor in c# with wpf. The editor apply changes (bold, italic, fontsize) only text selected for user. how can I make the change occurs before typing the text in editor ?! Tnks

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

      So, what you have in mind is that there is no text currently selected, but the Textbox has focus, and the insertion point is set somewhere, and you press a button, or something, and then the next characters you type are in bold, italic, etc., depending on what buttons you pressed ? What have you tried so far ? What are you doing now, in code, that sets the selected text to bold, italic, etc. ?

      ~ “This isn't right; this isn't even wrong." Wolfgang Pauli, commenting on a physics paper submitted for a journal

      J 1 Reply Last reply
      0
      • B BillWoodruff

        So, what you have in mind is that there is no text currently selected, but the Textbox has focus, and the insertion point is set somewhere, and you press a button, or something, and then the next characters you type are in bold, italic, etc., depending on what buttons you pressed ? What have you tried so far ? What are you doing now, in code, that sets the selected text to bold, italic, etc. ?

        ~ “This isn't right; this isn't even wrong." Wolfgang Pauli, commenting on a physics paper submitted for a journal

        J Offline
        J Offline
        juliogyn
        wrote on last edited by
        #3

        Then, remember Word when press "I" for the Italic the cursor change and the text to. In my case i need input text and after select all text e press "I" for changes. But i want to work as the Word. Now i use ApplyPropertyValue();

        B 1 Reply Last reply
        0
        • J juliogyn

          Then, remember Word when press "I" for the Italic the cursor change and the text to. In my case i need input text and after select all text e press "I" for changes. But i want to work as the Word. Now i use ApplyPropertyValue();

          B Offline
          B Offline
          BillWoodruff
          wrote on last edited by
          #4

          juliogyn wrote:

          Now i use ApplyPropertyValue();

          And, does that work for you ? If so, game-over.

          ~ “This isn't right; this isn't even wrong." Wolfgang Pauli, commenting on a physics paper submitted for a journal

          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