I have a combobox created and I need a textbox to become visible and ask how many they would like of the item they selected from the combobox... Once that number is entered, I need a pop-up window to appear that confirms the purchase with a yes/no. Any help would be great, I am new when it comes to C#.

Recommended Answers

All 3 Replies

Hi

I don't understand what you mean selected in the combobox? is the item already selected in the control or you want to select it automatically if they enter something in the textbox?

I'll assume an item is selected in the combobox to answer your question.

Well, inside your combobx_selectedItemChanged(...,...) method or any method that is executed when a user selects an item, you can can place code relevant to this :

textboxName.enable = true; //this will enable that button

wait for the user to enter some data into your textbox, read it, then you can use a MessageBox.Show();
method to display that pop up, then use an overload of the Show method that has both yesNo enum buttons. from there you can read the e.Keys and confirm which button was selected, depending on the user choice you might proceed or stop.

Please ask if anything is unclear.
Goodluck

Can you show your code, so we can see exactly where are you stuck?

I dont have any code for this so far... To make the combobox thing more clear... basically i have three options in the combobox... i need for every time i select on of these items in the combobox... i need a text box to become visible. I am suppose to input a number in that text box that states how many of that item I would like to buy. Then once that number is put into the texbox... i need a popup window that asks me to confirm the purchase with a yes/no window

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.