|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Yes/No ComboBoxThis will be used everywhere in the application, so I thought I would make a control that inherits from combobox. I am having trouble figuring out how to add the Y/N in control. I tried: Public Class YesNoCombobox Inherits ComboBox Sub New() MyBase.New() If Me.Items.Count = 0 Then Me.Items.Add("N - No") Me.Items.Add("Y - Yes") End If End Sub End Class This doubles the N/Y because the designer places a N/Y in the designer code as well. Anyone have thoughts on how to do this? Chris If it needs only Y & N, shouldn't it be a boolean control or a listbox
control, but not a ComboBox control? Using a ComboBox for this, I would say, is a good example of a poorly designed UI. UI's should be easy to use and understand for users. Users don't expect ComboBoxes for Y & N answers. Is there some reason why you feel you need a ComboBox for this? Show quoteHide quote "Chris" <no@spam.com> wrote in message news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... >I have a need to have a combo box that just has Yes & No as it options. >This will be used everywhere in the application, so I thought I would make >a control that inherits from combobox. I am having trouble figuring out >how to add the Y/N in control. I tried: > > > Public Class YesNoCombobox > Inherits ComboBox > Sub New() > MyBase.New() > If Me.Items.Count = 0 Then > Me.Items.Add("N - No") > Me.Items.Add("Y - Yes") > End If > End Sub > End Class > > This doubles the N/Y because the designer places a N/Y in the designer > code as well. Anyone have thoughts on how to do this? > > Chris "Scott M." <s-mar@nospam.nospam> schrieb: I'd use a checkbox control ("boolean control") :-).> If it needs only Y & N, shouldn't it be a boolean control or a listbox > control, but not a ComboBox control? -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Scott M. wrote:
Show quoteHide quote > If it needs only Y & N, shouldn't it be a boolean control or a listbox Yes, thank you for your concern on my design, but we are duplicating a > control, but not a ComboBox control? > > Using a ComboBox for this, I would say, is a good example of a poorly > designed UI. UI's should be easy to use and understand for users. Users > don't expect ComboBoxes for Y & N answers. > > Is there some reason why you feel you need a ComboBox for this? > > "Chris" <no@spam.com> wrote in message > news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... >> I have a need to have a combo box that just has Yes & No as it options. >> This will be used everywhere in the application, so I thought I would make >> a control that inherits from combobox. I am having trouble figuring out >> how to add the Y/N in control. I tried: >> >> >> Public Class YesNoCombobox >> Inherits ComboBox >> Sub New() >> MyBase.New() >> If Me.Items.Count = 0 Then >> Me.Items.Add("N - No") >> Me.Items.Add("Y - Yes") >> End If >> End Sub >> End Class >> >> This doubles the N/Y because the designer places a N/Y in the designer >> code as well. Anyone have thoughts on how to do this? >> >> Chris > > functionality that already exists. They like the way it is and it is not worth fighting to change it. It works well and it I still would like a solution. Chris At the end it is what the customer wants. If they like it a combo box
it must be a combobox :) Chris try the follwoing: Protected Overrides Sub InitLayout() MyBase.InitLayout() If Me.Items.Count = 0 Then Me.Items.Add("Yes") Me.Items.Add("No") End If End Sub It worked for me. Cheers, Ahmed Chris wrote: Show quoteHide quote > Scott M. wrote: > > If it needs only Y & N, shouldn't it be a boolean control or a listbox > > control, but not a ComboBox control? > > > > Using a ComboBox for this, I would say, is a good example of a poorly > > designed UI. UI's should be easy to use and understand for users. Users > > don't expect ComboBoxes for Y & N answers. > > > > Is there some reason why you feel you need a ComboBox for this? > > > > "Chris" <no@spam.com> wrote in message > > news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... > >> I have a need to have a combo box that just has Yes & No as it options. > >> This will be used everywhere in the application, so I thought I would make > >> a control that inherits from combobox. I am having trouble figuring out > >> how to add the Y/N in control. I tried: > >> > >> > >> Public Class YesNoCombobox > >> Inherits ComboBox > >> Sub New() > >> MyBase.New() > >> If Me.Items.Count = 0 Then > >> Me.Items.Add("N - No") > >> Me.Items.Add("Y - Yes") > >> End If > >> End Sub > >> End Class > >> > >> This doubles the N/Y because the designer places a N/Y in the designer > >> code as well. Anyone have thoughts on how to do this? > >> > >> Chris > > > > > > Yes, thank you for your concern on my design, but we are duplicating a > functionality that already exists. They like the way it is and it is > not worth fighting to change it. It works well and it I still would > like a solution. > > Chris Ahmed,
At the end it is what the customer tells when they have chosen another shop. By instance that those had a more from this time solution with an easier way of handling by instance the UI commands, which saved them a lot of time. Just my thought reading your message. Cor Show quoteHide quote "Ahmed" <ahmed1***@gmail.com> schreef in bericht news:1151026411.404701.116900@r2g2000cwb.googlegroups.com... > At the end it is what the customer wants. If they like it a combo box > it must be a combobox :) > > Chris try the follwoing: > > Protected Overrides Sub InitLayout() > MyBase.InitLayout() > > If Me.Items.Count = 0 Then > Me.Items.Add("Yes") > Me.Items.Add("No") > End If > End Sub > > It worked for me. > > Cheers, > > Ahmed > Chris wrote: >> Scott M. wrote: >> > If it needs only Y & N, shouldn't it be a boolean control or a listbox >> > control, but not a ComboBox control? >> > >> > Using a ComboBox for this, I would say, is a good example of a poorly >> > designed UI. UI's should be easy to use and understand for users. >> > Users >> > don't expect ComboBoxes for Y & N answers. >> > >> > Is there some reason why you feel you need a ComboBox for this? >> > >> > "Chris" <no@spam.com> wrote in message >> > news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... >> >> I have a need to have a combo box that just has Yes & No as it >> >> options. >> >> This will be used everywhere in the application, so I thought I would >> >> make >> >> a control that inherits from combobox. I am having trouble figuring >> >> out >> >> how to add the Y/N in control. I tried: >> >> >> >> >> >> Public Class YesNoCombobox >> >> Inherits ComboBox >> >> Sub New() >> >> MyBase.New() >> >> If Me.Items.Count = 0 Then >> >> Me.Items.Add("N - No") >> >> Me.Items.Add("Y - Yes") >> >> End If >> >> End Sub >> >> End Class >> >> >> >> This doubles the N/Y because the designer places a N/Y in the designer >> >> code as well. Anyone have thoughts on how to do this? >> >> >> >> Chris >> > >> > >> >> Yes, thank you for your concern on my design, but we are duplicating a >> functionality that already exists. They like the way it is and it is >> not worth fighting to change it. It works well and it I still would >> like a solution. >> >> Chris > I guess you will be losing many customers :P
when it comes to creating programs in house and dealing with non-technical personnel it becomes even worse. Cor Ligthert [MVP] wrote: Show quoteHide quote > Ahmed, > > At the end it is what the customer tells when they have chosen another shop. > > By instance that those had a more from this time solution with an easier way > of handling by instance the UI commands, which saved them a lot of time. > > Just my thought reading your message. > > Cor > > "Ahmed" <ahmed1***@gmail.com> schreef in bericht > news:1151026411.404701.116900@r2g2000cwb.googlegroups.com... > > At the end it is what the customer wants. If they like it a combo box > > it must be a combobox :) > > > > Chris try the follwoing: > > > > Protected Overrides Sub InitLayout() > > MyBase.InitLayout() > > > > If Me.Items.Count = 0 Then > > Me.Items.Add("Yes") > > Me.Items.Add("No") > > End If > > End Sub > > > > It worked for me. > > > > Cheers, > > > > Ahmed > > Chris wrote: > >> Scott M. wrote: > >> > If it needs only Y & N, shouldn't it be a boolean control or a listbox > >> > control, but not a ComboBox control? > >> > > >> > Using a ComboBox for this, I would say, is a good example of a poorly > >> > designed UI. UI's should be easy to use and understand for users. > >> > Users > >> > don't expect ComboBoxes for Y & N answers. > >> > > >> > Is there some reason why you feel you need a ComboBox for this? > >> > > >> > "Chris" <no@spam.com> wrote in message > >> > news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... > >> >> I have a need to have a combo box that just has Yes & No as it > >> >> options. > >> >> This will be used everywhere in the application, so I thought I would > >> >> make > >> >> a control that inherits from combobox. I am having trouble figuring > >> >> out > >> >> how to add the Y/N in control. I tried: > >> >> > >> >> > >> >> Public Class YesNoCombobox > >> >> Inherits ComboBox > >> >> Sub New() > >> >> MyBase.New() > >> >> If Me.Items.Count = 0 Then > >> >> Me.Items.Add("N - No") > >> >> Me.Items.Add("Y - Yes") > >> >> End If > >> >> End Sub > >> >> End Class > >> >> > >> >> This doubles the N/Y because the designer places a N/Y in the designer > >> >> code as well. Anyone have thoughts on how to do this? > >> >> > >> >> Chris > >> > > >> > > >> > >> Yes, thank you for your concern on my design, but we are duplicating a > >> functionality that already exists. They like the way it is and it is > >> not worth fighting to change it. It works well and it I still would > >> like a solution. > >> > >> Chris > > Even MS doesn't follow this suggestion. Take a look at the properties page
for various controls (text edit for example) and you will see multiple instances of properties marked Yes/No or True/False that are combo boxes and not checkboxes. Mike Ober. Show quoteHide quote "Scott M." <s-mar@nospam.nospam> wrote in message news:upBMo$klGHA.1240@TK2MSFTNGP05.phx.gbl... > > If it needs only Y & N, shouldn't it be a boolean control or a listbox > control, but not a ComboBox control? > > Using a ComboBox for this, I would say, is a good example of a poorly > designed UI. UI's should be easy to use and understand for users. Users > don't expect ComboBoxes for Y & N answers. > > Is there some reason why you feel you need a ComboBox for this? > > "Chris" <no@spam.com> wrote in message > news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... > >I have a need to have a combo box that just has Yes & No as it options. > >This will be used everywhere in the application, so I thought I would make > >a control that inherits from combobox. I am having trouble figuring out > >how to add the Y/N in control. I tried: > > > > > > Public Class YesNoCombobox > > Inherits ComboBox > > Sub New() > > MyBase.New() > > If Me.Items.Count = 0 Then > > Me.Items.Add("N - No") > > Me.Items.Add("Y - Yes") > > End If > > End Sub > > End Class > > > > This doubles the N/Y because the designer places a N/Y in the designer > > code as well. Anyone have thoughts on how to do this? > > > > Chris > > > I tend to you comboboxes for "yes/no" where I need to record the third state
(ie unselected). Sometimes in a form, I want the user to specifically make a choice, rather than perhaps forget and take the default. I find the combobox better than the checkbox for this purpose. Having said that the checkbox is more the norm. for yes/no true/false boolean tests. Simon -- Show quoteHide quote================================ Simon Verona Dealer Management Service Ltd Stewart House Centurion Business Park Julian Way Sheffield S9 1GD Tel: 0870 080 2300 Fax: 0870 735 0011 "Michael D. Ober" <ober***@.alum.mit.edu.nospam> wrote in message news:O4ACIfslGHA.3588@TK2MSFTNGP02.phx.gbl... > > Even MS doesn't follow this suggestion. Take a look at the properties > page > for various controls (text edit for example) and you will see multiple > instances of properties marked Yes/No or True/False that are combo boxes > and > not checkboxes. > > Mike Ober. > > "Scott M." <s-mar@nospam.nospam> wrote in message > news:upBMo$klGHA.1240@TK2MSFTNGP05.phx.gbl... >> >> If it needs only Y & N, shouldn't it be a boolean control or a listbox >> control, but not a ComboBox control? >> >> Using a ComboBox for this, I would say, is a good example of a poorly >> designed UI. UI's should be easy to use and understand for users. Users >> don't expect ComboBoxes for Y & N answers. >> >> Is there some reason why you feel you need a ComboBox for this? >> >> "Chris" <no@spam.com> wrote in message >> news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... >> >I have a need to have a combo box that just has Yes & No as it options. >> >This will be used everywhere in the application, so I thought I would > make >> >a control that inherits from combobox. I am having trouble figuring out >> >how to add the Y/N in control. I tried: >> > >> > >> > Public Class YesNoCombobox >> > Inherits ComboBox >> > Sub New() >> > MyBase.New() >> > If Me.Items.Count = 0 Then >> > Me.Items.Add("N - No") >> > Me.Items.Add("Y - Yes") >> > End If >> > End Sub >> > End Class >> > >> > This doubles the N/Y because the designer places a N/Y in the designer >> > code as well. Anyone have thoughts on how to do this? >> > >> > Chris >> >> >> > > > Michael,
Do you use Version 2003, if you have ever opened an "add reference dialog box", you would never write anymore than *even*. However there has been a suggestion to do that better and the boxes in the VBNet windowsform IDE version 2005 are now completely resizable. To say it in other words, it are just normal developers who make the same mistakes as you and me, but change things when there is put their attention on it.. Just my thought, Cor Show quoteHide quote "Michael D. Ober" <ober***@.alum.mit.edu.nospam> schreef in bericht news:O4ACIfslGHA.3588@TK2MSFTNGP02.phx.gbl... > > Even MS doesn't follow this suggestion. Take a look at the properties > page > for various controls (text edit for example) and you will see multiple > instances of properties marked Yes/No or True/False that are combo boxes > and > not checkboxes. > > Mike Ober. > > "Scott M." <s-mar@nospam.nospam> wrote in message > news:upBMo$klGHA.1240@TK2MSFTNGP05.phx.gbl... >> >> If it needs only Y & N, shouldn't it be a boolean control or a listbox >> control, but not a ComboBox control? >> >> Using a ComboBox for this, I would say, is a good example of a poorly >> designed UI. UI's should be easy to use and understand for users. Users >> don't expect ComboBoxes for Y & N answers. >> >> Is there some reason why you feel you need a ComboBox for this? >> >> "Chris" <no@spam.com> wrote in message >> news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... >> >I have a need to have a combo box that just has Yes & No as it options. >> >This will be used everywhere in the application, so I thought I would > make >> >a control that inherits from combobox. I am having trouble figuring out >> >how to add the Y/N in control. I tried: >> > >> > >> > Public Class YesNoCombobox >> > Inherits ComboBox >> > Sub New() >> > MyBase.New() >> > If Me.Items.Count = 0 Then >> > Me.Items.Add("N - No") >> > Me.Items.Add("Y - Yes") >> > End If >> > End Sub >> > End Class >> > >> > This doubles the N/Y because the designer places a N/Y in the designer >> > code as well. Anyone have thoughts on how to do this? >> > >> > Chris >> >> >> > > > Yes, but those listboxes are nested within a larger context. To say that
even MS doesn't follow this suggestion is incorrect. Show quoteHide quote "Michael D. Ober" <ober***@.alum.mit.edu.nospam> wrote in message news:O4ACIfslGHA.3588@TK2MSFTNGP02.phx.gbl... > > Even MS doesn't follow this suggestion. Take a look at the properties > page > for various controls (text edit for example) and you will see multiple > instances of properties marked Yes/No or True/False that are combo boxes > and > not checkboxes. > > Mike Ober. > > "Scott M." <s-mar@nospam.nospam> wrote in message > news:upBMo$klGHA.1240@TK2MSFTNGP05.phx.gbl... >> >> If it needs only Y & N, shouldn't it be a boolean control or a listbox >> control, but not a ComboBox control? >> >> Using a ComboBox for this, I would say, is a good example of a poorly >> designed UI. UI's should be easy to use and understand for users. Users >> don't expect ComboBoxes for Y & N answers. >> >> Is there some reason why you feel you need a ComboBox for this? >> >> "Chris" <no@spam.com> wrote in message >> news:eoo0WxklGHA.3304@TK2MSFTNGP03.phx.gbl... >> >I have a need to have a combo box that just has Yes & No as it options. >> >This will be used everywhere in the application, so I thought I would > make >> >a control that inherits from combobox. I am having trouble figuring out >> >how to add the Y/N in control. I tried: >> > >> > >> > Public Class YesNoCombobox >> > Inherits ComboBox >> > Sub New() >> > MyBase.New() >> > If Me.Items.Count = 0 Then >> > Me.Items.Add("N - No") >> > Me.Items.Add("Y - Yes") >> > End If >> > End Sub >> > End Class >> > >> > This doubles the N/Y because the designer places a N/Y in the designer >> > code as well. Anyone have thoughts on how to do this? >> > >> > Chris >> >> >> > > > Hello Chris,
All this talk of checkboxes.. For purely Yes/No selections (for which Yes is mutually exclusive of No) radiobuttons are the correct control. If the user can select both Yes and No, then three radiobuttons (Yes, No, Mabey) is better. Perhaps ya'll were thinking of a single checkbox.. which would work as well.. but it doesn't convey the same Yes/No UI option that a Y/N combobox would. -Boo Show quoteHide quote > I have a need to have a combo box that just has Yes & No as it > options. > This will be used everywhere in the application, so I thought I > would > make a control that inherits from combobox. I am having trouble > figuring out how to add the Y/N in control. I tried: > > Public Class YesNoCombobox > Inherits ComboBox > Sub New() > MyBase.New() > If Me.Items.Count = 0 Then > Me.Items.Add("N - No") > Me.Items.Add("Y - Yes") > End If > End Sub > End Class > This doubles the N/Y because the designer places a N/Y in the designer > code as well. Anyone have thoughts on how to do this? > > Chris > "GhostInAK" <ghosti***@gmail.com> schrieb: How do you come to this perception?!> All this talk of checkboxes.. For purely Yes/No selections (for which Yes > is mutually exclusive of No) radiobuttons are the correct control. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> When I pay my bills online, I am forced to check a single checkbox,
indicating that "Yes", I have read and agree to the terms and conditions of that web site. If I don't check the checkbox, it means that "No", I don't. The single checkbox solution is just as valid as the Yes & No radiobutton solution. All I suggested was that a "Boolean" control would be best. Both checkboxes and radiobuttons are Boolean. Show quoteHide quote "GhostInAK" <ghosti***@gmail.com> wrote in message news:be1391bfb8238c864bcdbc1a70b@news.microsoft.com... > Hello Chris, > > All this talk of checkboxes.. For purely Yes/No selections (for which Yes > is mutually exclusive of No) radiobuttons are the correct control. If the > user can select both Yes and No, then three radiobuttons (Yes, No, Mabey) > is better. Perhaps ya'll were thinking of a single checkbox.. which would > work as well.. but it doesn't convey the same Yes/No UI option that a Y/N > combobox would. > > -Boo > >> I have a need to have a combo box that just has Yes & No as it >> options. >> This will be used everywhere in the application, so I thought I >> would >> make a control that inherits from combobox. I am having trouble >> figuring out how to add the Y/N in control. I tried: >> >> Public Class YesNoCombobox >> Inherits ComboBox >> Sub New() >> MyBase.New() >> If Me.Items.Count = 0 Then >> Me.Items.Add("N - No") >> Me.Items.Add("Y - Yes") >> End If >> End Sub >> End Class >> This doubles the N/Y because the designer places a N/Y in the designer >> code as well. Anyone have thoughts on how to do this? >> >> Chris >> > > Hello GhostInAK,
My appologies. I meant in the context of providing both Yes and No as UI elements (as the combobox would have done). Some days I forget to type a letter.. some days I gotget to type a word.. other days I forget to type whole paragraphs. -Boo Show quoteHide quote > Hello Chris, > > All this talk of checkboxes.. For purely Yes/No selections (for which > Yes is mutually exclusive of No) radiobuttons are the correct control. > If the user can select both Yes and No, then three radiobuttons (Yes, > No, Mabey) is better. Perhaps ya'll were thinking of a single > checkbox.. which would work as well.. but it doesn't convey the same > Yes/No UI option that a Y/N combobox would. > > -Boo > >> I have a need to have a combo box that just has Yes & No as it >> options. >> This will be used everywhere in the application, so I thought I >> would >> make a control that inherits from combobox. I am having trouble >> figuring out how to add the Y/N in control. I tried: >> Public Class YesNoCombobox >> Inherits ComboBox >> Sub New() >> MyBase.New() >> If Me.Items.Count = 0 Then >> Me.Items.Add("N - No") >> Me.Items.Add("Y - Yes") >> End If >> End Sub >> End Class >> This doubles the N/Y because the designer places a N/Y in the >> designer >> code as well. Anyone have thoughts on how to do this? >> Chris >>
variable declaration ?
Unicode API How to assign a state to checkbox in Visual Basic.net ? Programatically create a Stored Procedure Paramters passing and RunWorkerCompleted event Accessing Login info Parse text into words? Find out child type in base class call? Source object on right click Line 1: Incorrect syntax near '1'. |
|||||||||||||||||||||||