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
Post a Comment