|
-
February 25th, 1999, 01:01 AM
#1
Avoiding click event ....
Hi Friends,
I am using a combobox, inwhich I filled out items. At the end when I set the listindex property of combo, automatically CLICK event is get fired. So my question is How I can avoid the click event to get fired, if I don't want for some time....
Thanx...
Anand...
-
March 18th, 1999, 04:27 AM
#2
Re: Avoiding click event ....
Hi,
I guess there is no way you can stop the click event from firing when you set listindex of a combobox. Only way is a work around.
Have a boolean member variable , something like m_bDontProcessClick
Just before you set the value of list index, set this flag to true : Like
m_bDontProcessClick = true
cmbMyCombo.ListIndex = i
m_bDontProcessClick = False ' <<-- Important LINE!
and in the click event, check for this flag and exit if true.
private sub cmbMyCombo_Click
if m_bDontProcessClick then exit sub
.... rest of the normal processing follows..
end sub
Be sure to reset the flag, otherwise your legitimate clicks also will not be processed!
Ravi
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
|