Hi !!! I have problem with Refreshing or Redrawing my Window Form. I have one Rich Text Box on my Form and i have a list of title of books on it. I wish when I add a new title book to Rich Text Box to Refresh/Redraw the all Windows Form or just Refresh/Redraw Rich Text Box. I try to use "Refresh()" method and "Invalidate(true)" but nothing happen. Rich Text Box it's still the same state. But when i restart the program the title of new added book is added in the Rich Text Box but this no suits me. Can you help me ??? Sorry for my bad English !!!

Recommended Answers

All 6 Replies

Hi,

Could you provide your current code, cause as far as I know it should refresh itself automatically whenever you append a text to it. :)

For instance, when you click on a button you can add a new string found in a textbox:

richTextBox1.AppendText(textBox1.Text);

The example with Title of books is just a example. I would like in one Panel Control to Refresh a couple Label Controls. Because the property Text of Label Control is changed by the user. I would Like to Refresh or Redrawing, when user change the property Text. Sorry for my bad English !!! :)

It refreshes and redraws automatically whenever it's changed either by the program or by the user, this is why I want to see your code, because it's likely that there is a bug what you didn't notice

My project is too big. And if i wish to paste some code snippet I need to paste too big part. You are telling me that Refresh() and Invalidate() methods doesn't work it can be some bug in my code, am I right? Can you give me some internet pages where have some examples of using Refresh() and Invalidate() methods ??? Sorry for my bad English !!!

I found my bug. Thank you for your help !!!

this.refresh();
or
this.update();

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.