473,405 Members | 2,344 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

What triggers a ListBox OnClick Event

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
1 6974

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Vengeance | last post by:
On the parent_form.aspx I have these controls <asp:listbox id="Operators" runat="server" Width="163px" SelectionMode="Multiple" Rows="2"></asp:listbox> <INPUT class="loButton" onclick="java...
1
by: Annette Massie | last post by:
I would like to have a form that lists current addresses being used. On this form I would also like to have a command button that would allow the user to add an address if they do not see it...
0
by: Ray | last post by:
Folks, I have just created a simple procedure that does the following: Determines the width of the columns of a listbox. Places a button of the correct size above each column as the form opens....
6
by: Steve | last post by:
Hi, I open up a webform (vb.net) and populate a listbox control on the Page load event. If I click on (select) and item from the listbox I want to write the value of the selected item to a...
1
by: RedGST | last post by:
Hello, Im somewhat new to asp.net, so bear with me. I have created a form that has a Listbox along with 2 command buttons & a few other non-important controls. The command button is tied to...
1
by: Dabbler | last post by:
I have a GridView which triggers the SelectedIndexChanging event when I click on the row anywhere implemented by this code in RowDataBound event handler: if ( e.Row.RowType ==...
2
by: teo | last post by:
I have a Listbox, if I set EnableViewStarte = False the AutopostaBack fired by SelectedIndexChanged doesn't work. The 'SelectedIndexChanged' event should call
5
by: buddydasari | last post by:
Hi all I wrote a listbox onclick event.On a click i want to get the selected row details but the listbox.selected(i) always returns false ,it returns true only in double click event.Are they...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.