开发者

Visual C# Combobox

开发者 https://www.devze.com 2023-04-02 01:44 出处:网络
Is it possible if I choose 2 in my numericupdown control I will also have 2 comboboxes?? It\'s that the comboboxes that will appear will vary from the value of my numericupdown button.

Is it possible if I choose 2 in my numericupdown control I will also have 2 comboboxes??

It's that the comboboxes that will appear will vary from the value of my numericupdown button.

Or Maybe I'm thinking if i input 5 in my numeric updown I will have the choose 5 datas in my combobox and my choices will be stored in a listbox.

Because I'm making a room assignment. for example a customer wishes to rent 5 r开发者_Go百科ooms I should assign him with 5 available rooms. And I want my rooms assignment to be recorded in a listbox so that I can keep track of my mistakes.. Is it Possible??

If my question violated the rule, can somebody just please post links related to this problem. I know I'm a bit annoying to this site and I am very sorry :((


I'm going to take some guesses as to what you are trying to do as it isn't very clear from your question.

If you are asking:

Is it possible to create a Windows Forms dialog which dynamically displays n ComboBox controls at runtime based on a user supplied value from a NumericUpDown control?

Then the answer, is: Yes, it's possible. There are several ways to accomplish this, although the simplest would probably be to use one of the layout panels, possibly the TableLayoutPanel or the FlowLayoutPanel. Essentially, you would need to respond to the (probably) the ValueChanged event on the NumericUpDown control. In that event handler, you would then need to programatically create the appropriate number of ComboBox controls (based on the value of the NumericUpDown control) and add them to the layout panel.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号