|
-
Aug 2nd, 2000, 03:58 PM
#1
Thread Starter
New Member
I'm not sure how to explain with words, so let me put the code down and maybe someone out there can explain why it doesn't work.
'from class1
Private WithEvents txt As TextBox
Public Property Set TextBoxCtl(OutsideTextBox As TextBox)
Set txt = OutsideTextBox
End Property
'in the main form
Private textcontrol as class1
Set textcontrol = new class1
Set textcontrol.TextBoxCtl = Text1(0)
'Text1(0) being part of a control array
When I run I get the error "Object or class does not support that set of events"
I'm rather new at this and completely baffled.
-
Aug 2nd, 2000, 04:07 PM
#2
transcendental analytic
I'm not sure, but it could be the array of Text1 raises events with a index argument, and you don't have those in your class1. Have you tested with a textbox that is not in an array?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
Aug 3rd, 2000, 09:31 AM
#3
Thread Starter
New Member
It works fine for single text boxes. How could I change the TextBoxCtl property to an array of controls? I've tried a few things, (changing the argument "outsidetextbox" to an array, changing the storage var "txt" to an array, adding and Index param to the txt_Change and txt_KeyPress events) but they all raise errors.
-
Aug 3rd, 2000, 02:16 PM
#4
transcendental analytic
I guess there is no way out, just if you didn't make the control an array, and instead make a reference array with all the textboxes references inside
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
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
|
Click Here to Expand Forum to Full Width
|