|
-
Aug 10th, 2000, 02:41 PM
#1
Thread Starter
Hyperactive Member
Hey, if I use:
Code:
listview1.ListItems(5).Selected = True
the 5th item is selected, but the code in the click or itemclick isn't triggered like it is if I actually click on the 5th item. So what event is fired when I select the item through code??
Thanks!
-
Aug 10th, 2000, 02:50 PM
#2
transcendental analytic
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 10th, 2000, 02:59 PM
#3
Thread Starter
Hyperactive Member
But other controls like a combo or list fire when I select an index through code. Something MS didn't give us with the listview (in report view)??
-
Aug 10th, 2000, 03:22 PM
#4
Thread Starter
Hyperactive Member
Is there a way of dynamically calling the event -- something like:
Code:
Dim z As Variant
z = frmMain.lVwEmplyCatg_Click
Call z
where I would pass z. This is a module to which I pass the control so I don't want to hard-code any values. Thanks.
-
Aug 10th, 2000, 03:31 PM
#5
transcendental analytic
No, there's addressof but i think you can't use it with a VB calls.
Why do you need it to be dynamic? you could just call an event after you use the code .Selected=True
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 10th, 2000, 03:35 PM
#6
Thread Starter
Hyperactive Member
addressof would apply if I wanted to subclass and read the window messages without the help of vb's control events (plus catch messages that vb doesn't provide to you). I'm using a sub that's modular so that the code doesn't have to be repeated later and modified. If I put in a hard-coded control name, I'll have to revise it for each listview calling it. Thanks.
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
|