Page 1 of 1

RichTextBox in Current Tab Function

Posted: Thu Aug 26, 2010 10:08 pm
by GoodGuy17
Hello,
I have a TabControl, and on a button click or Form_Load it adds a tab. I made the RichTextBox detect URLs by setting the property in code when you add a tab. Now, here is my problem. You know how you click a button? It has a function named Button_Click that the program calls. If the button was added at runtime, how could you code what it does when clicked? This is my scenario, except the button is a RichTextBox, and I need to put code in the RichTextBox_LinkClicked event. The RTB was added at runtime, and in a tab. How can I put code in a richtextbox that was added at runtime in a tabcontrol?
Special Thanks to first answerer.
~GoodGuy17 :D

Re: RichTextBox in Current Tab Function

Posted: Thu Aug 26, 2010 10:10 pm
by Axel
addhandler mydeclaredbutton.click , addresof clickxx
public sub clickxx
end sub

that would work i guess :P

EDIT : i am first hooray :D

Re: RichTextBox in Current Tab Function

Posted: Thu Aug 26, 2010 10:15 pm
by GoodGuy17
Let me try it.

Re: RichTextBox in Current Tab Function

Posted: Thu Aug 26, 2010 10:22 pm
by GoodGuy17
Thank you, it works. I added you in the Special Thanks section of the credits.

Re: RichTextBox in Current Tab Function

Posted: Thu Aug 26, 2010 10:23 pm
by Axel
GoodGuy17 wrote:
Thank you, it works. I added you in the Special Thanks section of the credits.
thank you so much :D