Combobox opening or not

Mimi

Member
Joined
Jul 13, 2020
Messages
9
Programming Experience
Beginner
I have a combobox with DropDownStyle = DropDownList. After clicking on the combobox, it should show me two options :

1) the combobox opens a list of items for selection

or

2) the combobox does not open, ( the value of the combobox if it was loaded in the previous selection should not be changed )
 
Are you saying that you don't want the user to be able to change their selection once it has been made? If so, just handle the Leave event and disable the ComboBox if the SelectedItem is not null.
 
I need to click on the comcobox to open the message box YES / NO where I can choose to start the combobox(show the items list), or leave the combobox (do not show the items list). I tried events, I can't do it
 
If you only have two choices, it's better to use a checkbox rather than a combobox.
 
Can you show us your attempt of using events that you mentioned in post #4?

As an aside, this sounds like a really bad UI design. As a user, would you expect Microsoft Word to bring up a message box asking if you want to to show you the list of fonts when you click on the font combobox on the toolbar? And even worse, once you've selected a font, would you expect the drop down to be disabled so that you are not allowed to select a different font?

I suspect that you are trying to combine different UIs into a single UI. You should really keep them separate. Perhaps a Wizard style UI is more appropriate where you make choice on one page, and the next page's contents are dependent on the choice made now.
 
I need to click on the comcobox to open the message box YES / NO where I can choose to start the combobox(show the items list), or leave the combobox (do not show the items list). I tried events, I can't do it
That seems to make no sense at all. If the user were to select the second option then why would they have clicked the ComboBox in the first place? I generally don't go around clicking controls in order to specify that I don't want to use that control. Is this application for insane people?
 
I'm almost in tears laughing here. Lets assume for a moment their might be more than one combobox and the OP isn't being very specific.

If that's not the case, then we can safely assume this is an app for the clinically insane. ?

Clearly this is just bad logic by our OP, and they need to rethink how best to display their lists or not. Seems like our OP wants to click the combobox to present a message box and if the messagebox answer is no, then the combox is disabled. My question to the OP is; how do you re-enable the combobox after disabling it?
 
The more I read post 7 the more unproductive I find this. However, you might be better using Mouse Events - Windows Forms and cancel the events and display your dialog instead. But then you need to invoke the list to display. This is not a good idea or design, but its your app, and your call.
 
Back
Top Bottom