Click here to Skip to main content
15,885,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: Best way to store data? Pin
TigerNinja_1-Nov-02 11:30
TigerNinja_1-Nov-02 11:30 
GeneralEnumerating Severs on Win9x Pin
mikasa1-Nov-02 7:31
mikasa1-Nov-02 7:31 
GeneralRe: Enumerating Severs on Win9x Pin
TigerNinja_1-Nov-02 11:29
TigerNinja_1-Nov-02 11:29 
GeneralRe: Enumerating Severs on Win9x Pin
mikasa1-Nov-02 11:40
mikasa1-Nov-02 11:40 
GeneralBetter RichTextBox (or custom textbox) Pin
Bog1-Nov-02 5:48
Bog1-Nov-02 5:48 
GeneralRe: Better RichTextBox (or custom textbox) Pin
Pete Bassett1-Nov-02 6:30
Pete Bassett1-Nov-02 6:30 
GeneralRe: Better RichTextBox (or custom textbox) Pin
Bog2-Nov-02 5:05
Bog2-Nov-02 5:05 
GeneralRe: Better RichTextBox (or custom textbox) Pin
Pete Bassett3-Nov-02 7:47
Pete Bassett3-Nov-02 7:47 
Bog wrote:
were you able to do it while the user is typing

Yup. Just disable drawing to the window so none of the results of your selection code is drawn while you're doing it. Then store the actual selection (which will probably just be the current caret location) then run your highlightiong code, changing the selection etc etc etc. Then resore the selection/caret etc and Re-enable drawing to the rich text window.

I handled a couple of cases

1) if the user is just typeing, only highlight the current line. This makes the hightlighting quick.

2) When the RTB gets pasted to, highlight the newly added parts or the whole document.

Have a look at the C++ examples to get a better idea of the process. Failing that, just have a go at it and see how it works.


Pete

Insert Sig. Here!
GeneralRe: Better RichTextBox (or custom textbox) Pin
Philip Fitzsimons1-Nov-02 6:54
Philip Fitzsimons1-Nov-02 6:54 
GeneralRe: Better RichTextBox (or custom textbox) Pin
Stephane Rodriguez.1-Nov-02 7:07
Stephane Rodriguez.1-Nov-02 7:07 
GeneralPassword in a Propertygrid Pin
Andy Hampshire1-Nov-02 4:00
Andy Hampshire1-Nov-02 4:00 
GeneralRe: Password in a Propertygrid Pin
Stephane Rodriguez.1-Nov-02 7:12
Stephane Rodriguez.1-Nov-02 7:12 
GeneralRe: Password in a Propertygrid Pin
Andy Hampshire1-Nov-02 7:23
Andy Hampshire1-Nov-02 7:23 
GeneralRe: Password in a Propertygrid - HELP !! Pin
Andy Hampshire1-Nov-02 14:22
Andy Hampshire1-Nov-02 14:22 
GeneralRe: Password in a Propertygrid - HELP !! Pin
leppie1-Nov-02 21:16
leppie1-Nov-02 21:16 
GeneralRe: Password in a Propertygrid - HELP !! Pin
Feng Qin3-Nov-02 21:24
Feng Qin3-Nov-02 21:24 
GeneralNot able to fetch first row of excel...... Pin
Saroj31-Oct-02 23:33
Saroj31-Oct-02 23:33 
GeneralRe: Not able to fetch first row of excel...... Pin
Stephane Rodriguez.1-Nov-02 1:59
Stephane Rodriguez.1-Nov-02 1:59 
Generalabout visual soucesafe6.0c Pin
Anonymous31-Oct-02 21:18
Anonymous31-Oct-02 21:18 
GeneralRe: about visual soucesafe6.0c Pin
TigerNinja_1-Nov-02 11:33
TigerNinja_1-Nov-02 11:33 
Generaldowncasting Object types Pin
Bilal31-Oct-02 20:33
Bilal31-Oct-02 20:33 
GeneralRe: downcasting Object types Pin
SimonS31-Oct-02 21:14
SimonS31-Oct-02 21:14 
GeneralRe: downcasting Object types Pin
Bilal31-Oct-02 21:19
Bilal31-Oct-02 21:19 
GeneralRe: downcasting Object types Pin
Eric Gunnerson (msft)1-Nov-02 12:01
Eric Gunnerson (msft)1-Nov-02 12:01 
GeneralRe: downcasting Object types Pin
John Fisher1-Nov-02 12:40
John Fisher1-Nov-02 12:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.