From 0f6b2c8b41d393f390e33a131bcbcded9b060e61 Mon Sep 17 00:00:00 2001 From: Miroslav Lichvar Date: Tue, 8 Jul 2008 16:53:14 +0200 Subject: [PATCH] redraw textbox in SetText() --- textbox.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/textbox.c b/textbox.c index 873a23c..6b83516 100644 --- a/textbox.c +++ b/textbox.c @@ -100,6 +100,7 @@ newtComponent newtTextbox(int left, int top, int width, int height, int flags) { co->ops = &textboxOps; + co->isMapped = 0; co->height = height; co->top = top; co->left = left; @@ -330,6 +331,8 @@ void newtTextboxSetText(newtComponent co, const char * text) { free(expanded); + textboxDraw(co); + newtTrashScreen(); } @@ -350,6 +353,9 @@ static void textboxDraw(newtComponent c) { struct textbox * tb = c->data; int size; + if (!c->isMapped) + return; + if (tb->sb) { size = tb->numLines - c->height; if (tb->isActive) { -- 2.39.2