c# - Richtexbox text style corruption when minimized -


i'm using richtexbox component message history panel. message consist of header (printed red , old) , body on new line.

it works using code:

richtextbox1.selectioncolor = color.red; richtextbox1.selectionfont = new font(richtextbox1.selectionfont, fontstyle.bold); richtextbox1.appendtext(header);     richtextbox1.selectioncolor = color.black; richtextbox1.selectionfont = new font(richtextbox1.selectionfont, fontstyle.regular); richtextbox1.appendtext(environment.newline + text + environment.newline + environment.newline); 

everything works ok when window active. messages added in time, when window minimized have corrupted font style , color. in cases looks body uses header style.

resolved using combination of

richtextbox1.update();  richtextbox1.deselectall(); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -