Newsgroups: microsoft.public.dotnet.languages.vb
From: mat...@online.microsoft.com (Matt Gertz)
Date: Wed, 21 May 2003 19:44:15 GMT
Local: Thurs, May 22 2003 5:44 am
Subject: Re: ComboBox.DataSource fires SelectedValueChanged event
Hi, Shawn,
OK, I see what you're seeing now. I was using "Add" to add values to the combo box, not "DataSource." Using "Add" doesn't cause the event to fire, because using "Add" doesn't change the value of what's in the combo box's edit box -- it leaves the edit box part alone. (In fact, the edit box ends up being blank if nothing was already in it.) However, using "Datasource" *does* change the value of the edit box -- incoming entries affect the selected value, until the last one, where it resets to the first item for the selection. I do not see any way to turn this behavior off, short of turning off the event handling or ignoring the event. Of course, you could iterate over the data itself and use "Add" to add values to the combobox, but it's probably cheaper to ignore the event during initialization, unless performance gets to be an issue due to all of those events. Sorry I couldn't be of more help. :-( If you like, I could file a bug --Matt Gertz--* > Subject: Re: ComboBox.DataSource fires SelectedValueChanged event cpmsftngxa06.phx.gbl!TK2MSFTNGXA06.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP 0 > Date: Wed, 21 May 2003 11:29:59 +0200 > Lines: 119 > X-Priority: 3 > X-MSMail-Priority: Normal > X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 > Message-ID: <elHIOu3HDHA.1...@tk2msftngp13.phx.gbl> > Newsgroups: microsoft.public.dotnet.languages.vb > NNTP-Posting-Host: pc4.akermaritime.no 193.161.152.244 > Path: 8.phx.gbl!tk2msftngp13.phx.gbl > Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.vb:109126
> X-Tomcat-NG: microsoft.public.dotnet.languages.vb > Hi Matt. Thanks for helping me here. I could do as you suggest and ignore > Shawn > "Matt Gertz" <mat...@online.microsoft.com> wrote in message > > I'd be happy to look into this further, but I'd need to see your > > --Matt Gertz--* > > > I'm populating the ComboBox in my Form_Load method and the > > > Thanks, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||