-
Problems with the events of dinamically created control
Hi, I´m new in this forum and I hope you can help me,
I´m doing a software with VB.Net 2003 and I have created a few listboxes dinamically. The problem comes when I have to use the events of those listboxes, I want to use ListBox1.Click event.
How can I do it?
Thanks,
TanKiE
-
You need to tie the events of the dynamically created controls to your handler subs.
From memory it will be something like:
Dim x as AControl
x = New Control
Me.Controls.Add(x)
AddHandler x.Click, AddressOf Me.HandleDynamic_Click
-
Thank you very much pfff 1 hour with this problem and it was so small :P
Similar Threads
-
By Asher in forum ASP.NET
Replies: 4
Last Post: 08-12-2002, 05:05 PM
-
By James Thresher in forum VB Classic
Replies: 0
Last Post: 10-03-2001, 07:59 AM
-
By Rudolph Jones in forum VB Classic
Replies: 0
Last Post: 05-16-2001, 05:24 PM
-
By Damit Senanayake in forum VB Classic
Replies: 0
Last Post: 02-04-2001, 09:56 AM
-
By Patrick in forum VB Classic
Replies: 0
Last Post: 04-18-2000, 06:01 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks