Click to See Complete Forum and Search --> : Avoiding click event ....
Anand
February 25th, 1999, 12:01 AM
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...
anand
February 25th, 1999, 12:01 AM
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...
Ravi Kiran
March 18th, 1999, 03:27 AM
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
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.