473,651 Members | 3,012 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Wierd issue with listbox and Begin...Endupda te

Tom
OK, here's a wierd one... I have a listbox, which I fill with strings (in my
case, file names). I normally load this via a loop, adding each item to the
list box in the loop. I put lb.BeginUpdate before the start of the loop, and
lb.EndUpdate at the conclusion of the loop.

Here's the wierd part: If there is only ONE line loaded into the list box,
the list box SHOWS UP AS BLANK! It says there is 1 item in the box, but it
never shows up on the screen, nor can it be clicked. However, if TWO or more
items are loaded into the list box, they all show up fine!

I've traced this to the Begin and End Update statements. If I remove these,
then everything works fine - including only loading one item into the
listbox. The second that I put the Begin..EndUpdat e lines back in, the
previous behavior occurs.

Any ideas as to why? Is this a list box bug? I would like to use the
Begin...EndUpda te as I could end up loading a large amount of data into the
listbox. But for the time being, I will have to remove the lines.

BTW, using VB.NET 2003 with Framework 1.1

Tom
Nov 20 '05 #1
0 1174

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7753
by: Alec MacLean | last post by:
Hi everyone, I have a ComboBox that when changed, calls a method to change the content of a ListBox. I'm also using the Listbox's SelectedIndexChanged event to change other control values on the form. (It's a Company -> People -> Personal Data relationship) When I bind my datasource to the ListBox, I find that the
14
18710
by: Paul_Madden via DotNetMonster.com | last post by:
Basically I have a listbox to which I add simple STRING items- I have a progress bar which I increment whenever I populate another portion of the complete set of items I wish to add. What I observe is that as more and more are added, population of the list box takes longer and longer. ie the first 10th of the item set are added much much quicker than the last 10th. THis occurs with about 40,000 listbox items. My worry is the listbox may...
6
3959
by: Zytan | last post by:
In win32 there was a way to 'turn off' a listbox from updating until you were done adding elements. Is there a way to do this in .NET? Zytan
4
2121
by: Anil Gupte | last post by:
I am using the following code: URLListBox.BeginUpdate() URLListBox.DataSource = DSContent '.Tables("ContentSites") URLListBox.DisplayMember = "ContentSites.SiteName" URLListBox.ValueMember = "ContentSites.URL" URLListBox.EndUpdate() The program execution insistis on going to the Sub URLListBox_SelectedIndexChanged after the 2nd line (URLListBox.DataSource =...) It does this for each item in the DataSet. Isn't this exactly what
0
8361
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
8701
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...
1
8466
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8584
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...
1
6158
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
4144
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4290
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2701
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
2
1588
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.