By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,917 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,917 IT Pros & Developers. It's quick & easy.

What triggers a ListBox OnClick Event

P: n/a
Hope someone can point me in the right direction.

When opening a form the 'click' event of the ListBox is invoked (run).
I thought the 'click' event of the ListBox is only invoked when
clicking it. I've looked all over the preceeding and other events on
the form and definitely do not invoke the ListBox 'Click' event.

What does happen during form initialisation or setup (load) is that the
rowsource, columnwidths, columncount etc are assigned to the listbox,
then the ListIndex is set.

Without the user clicking the listbox or not purposely invoking the
'click' event procedure from another event how is it possible for the
'click' event to be triggered?

I'm now asking the question as I'm now getting a heap of "Out of Stack
Space" errors and believe maybe associated to the Listbox 'click' event
problem.

Any suggestions welcome.

Sep 23 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a

superjacent wrote:
Hope someone can point me in the right direction.

When opening a form the 'click' event of the ListBox is invoked (run).
I thought the 'click' event of the ListBox is only invoked when
clicking it. I've looked all over the preceeding and other events on
the form and definitely do not invoke the ListBox 'Click' event.

What does happen during form initialisation or setup (load) is that the
rowsource, columnwidths, columncount etc are assigned to the listbox,
then the ListIndex is set.

Without the user clicking the listbox or not purposely invoking the
'click' event procedure from another event how is it possible for the
'click' event to be triggered?

I'm now asking the question as I'm now getting a heap of "Out of Stack
Space" errors and believe maybe associated to the Listbox 'click' event
problem.

Any suggestions welcome.
Wouldn't you know it. Post above question, just before heading off to
bed. Decided to check things out one last time and presto, found the
offending line.

I've discovered that it's the 'SetFocus' method that triggers the
'Click' event. I've never noticed that before.

Sep 23 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.