473,748 Members | 2,670 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7064

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
2918
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 script:getOptionPicker('?mid=TS5 &callingcontrol=Operators');" type="button" value="+"> <asp:button id="save" runat="server" CssClass="loButton" Text="Save"> </asp:button> I also use a global.js file which adds the following functions
1
3577
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 listed. Is it possible to have the form show the list box (which is a combinination of the address and city/state/zip), along with the detail fields address and city/state/zip? I guess I was thinking of have the listbox display and then when the...
0
2303
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. Sorts by that column when you click the button. Automatically toggles between ASC and DESC sort sequence. To implement it on a new form, you simply copy the buttons from my
6
6183
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 label control. Nothing happens. But when I click a button (which contains same code to write to label) I get the value of the selected item in the Label.
1
5074
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 the OnClick Event. My problem is that when the command button is clicked, the Listbox OnSelectedIndexChanged event gets fired before the command buttons OnClick
1
2596
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 == DataControlRowType.DataRow ){ e.Row.Attributes.Add( "onclick",this.GetPostBackClientEvent( RegistrantsGridView, "Select$" + e.Row.RowIndex.ToString() ) ); } The problem is that when I click on a DropDownList in the row, it triggers the above the rows...
2
2915
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
23903
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 any other events on which i could do this.I want to populate a textbox based on the row selected from the listbox.Its working as i want when i add the code in a double click event but it doesn't make much sense doing it on a double click event. ...
0
8995
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9561
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8252
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.