|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Detecting a ComboBox selectionreally for VB6 so I'm posting it here, too.) We have an application that is used to edit properties of a .NET form. It looks sort of like the .NET IDE, but is just for basically alterinf visyal attributes on the form. When you select a control (e.g., text box or label) you see some of ist properties in a PropertyGrid control and the name of the selected control in a ComboBox control we have off to the side. This all works fine. However, if one uses the ComboBox to select from a list of the available controls on the form, we don't seem to be able to detect this happening so we can't select the control on the form corresponding to the one selected by the ComboBox. Is there an event or some other "thing" we can use to tell us a selection was made with the ComboBox so we can then get that selection from the ComboBox and then highlight the control on the form? Any ideas or suggestions? Hi,
Currently I am finding one support professional for you on this issue. When any update, we will reply here at the first time. Best Regards, Wei-Dong XU Microsoft Product Support Services This posting is provided "AS IS" with no warranties, and confers no rights. It is my pleasure to be of assistance. Thanks. Looking forward to what you have on this. It has us stuck.
Show quote "Wei-Dong XU [MSFT]" wrote: > Hi, > > Currently I am finding one support professional for you on this issue. When > any update, we will reply here at the first time. > > Best Regards, > Wei-Dong XU > Microsoft Product Support Services > This posting is provided "AS IS" with no warranties, and confers no rights. > It is my pleasure to be of assistance. > > uh?
what about ComboBox.SelectedValueChanged ? ComboBox.SelectedIndexChanged? ComboBox.TextChanged? PayCheck.Increased? Show quote "NormD" <mach2@newsgroup.nospam> wrote in message news:26C559F1-D170-4ED9-B6D7-8BDED08310D6@microsoft.com... > (This was first posted in the VB newsgroup, but I got the impression that > is > really for VB6 so I'm posting it here, too.) > > We have an application that is used to edit properties of a .NET form. It > looks sort of like the .NET IDE, but is just for basically alterinf visyal > attributes on the form. > > When you select a control (e.g., text box or label) you see some of ist > properties in a PropertyGrid control and the name of the selected control > in > a ComboBox control we have off to the side. This all works fine. > > However, if one uses the ComboBox to select from a list of the available > controls on the form, we don't seem to be able to detect this happening so > we > can't select the control on the form corresponding to the one selected by > the > ComboBox. > > Is there an event or some other "thing" we can use to tell us a selection > was made with the ComboBox so we can then get that selection from the > ComboBox and then highlight the control on the form? Any ideas or > suggestions? Hi
Did Lloyd's suggestion helps you? For a .NET winform ComboBox control, we have two events will fired when you change selected item in the combo box. SelectedIndexChanged Occurs when the SelectedIndex property has changed. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ frlrfSystemWindowsFormsComboBoxClassSelectedIndexChangedTopic.asp SelectedValueChanged (inherited from ListControl) Occurs when the SelectedValue property changes. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ frlrfSystemWindowsFormsListControlClassSelectedValueChangedTopic.asp Here is a link about all the events about ComboBox. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ frlrfSystemWindowsFormsComboBoxEventsTopic.asp Best regards, Peter Huang Microsoft Online Partner Support Get Secure! - www.microsoft.com/security This posting is provided "AS IS" with no warranties, and confers no rights. I will pass the information on to the appropriate person. Thank you.
Show quote ""Peter Huang" [MSFT]" wrote: > Hi > > Did Lloyd's suggestion helps you? > For a .NET winform ComboBox control, we have two events will fired when you > change selected item in the combo box. > SelectedIndexChanged Occurs when the SelectedIndex property has changed. > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ > frlrfSystemWindowsFormsComboBoxClassSelectedIndexChangedTopic.asp > > SelectedValueChanged (inherited from ListControl) Occurs when the > SelectedValue property changes. > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ > frlrfSystemWindowsFormsListControlClassSelectedValueChangedTopic.asp > > Here is a link about all the events about ComboBox. > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/ > frlrfSystemWindowsFormsComboBoxEventsTopic.asp > > Best regards, > > Peter Huang > Microsoft Online Partner Support > > Get Secure! - www.microsoft.com/security > This posting is provided "AS IS" with no warranties, and confers no rights. > > "Peter Huang" [MSFT] wrote:
> For a .NET winform ComboBox control, we have two events will fired when you Except of course when an item is curently selected, and you .Clear the> change selected item in the combo box. > SelectedIndexChanged Occurs when the SelectedIndex property has changed. ..Items collection, which will make 'SelectedIndex' 'change' to -1, but without firing SelectedIndexChanged. Perhaps the event should be named SelectedIndexChangedToSomethingOtherThanNegativeOne. Oh, and if you have an item currently selected, drop down the list with the mouse, and click the currently selected item, 'SelectedIndex' will not 'change', but SelectedIndexChanged will fire. Perhaps the event should be named SelectedIndexRemainedTheSameOrChangedToSomethingOtherThanNegativeOne. -- Larry Lard Replies to group please Thanks, Larry! You have an interesting sense of humor re what the controls
really do and the corresponding effects on their names! Much more self-defining, but long to type! Show quote "Larry Lard" wrote: > > "Peter Huang" [MSFT] wrote: > > > For a .NET winform ComboBox control, we have two events will fired when you > > change selected item in the combo box. > > SelectedIndexChanged Occurs when the SelectedIndex property has changed. > > Except of course when an item is curently selected, and you .Clear the > ..Items collection, which will make 'SelectedIndex' 'change' to -1, but > without firing SelectedIndexChanged. Perhaps the event should be named > SelectedIndexChangedToSomethingOtherThanNegativeOne. > > Oh, and if you have an item currently selected, drop down the list with > the mouse, and click the currently selected item, 'SelectedIndex' will > not 'change', but SelectedIndexChanged will fire. Perhaps the event > should be named > SelectedIndexRemainedTheSameOrChangedToSomethingOtherThanNegativeOne. > > -- > Larry Lard > Replies to group please > > |
|||||||||||||||||||||||