Question

I am new to programming and I have a project to develop of a small shopping mall kind

What I want to know is how to add multiple items since there is only a single Textbox for a single item but when there are multiple items how should it work

1)Is it a correct way for designing application If it is fine enough then 2)Once I click on Add Button to add multiple items how the things should go i.e; Do I need to save the things once the user click on Add button and make the textboxes empty so that the user can enter new item

or

is there any other way please specify.

Was it helpful?

Solution

There are several approaches and designs. I would refer your question to UX Stack Exchanges

One way is to have a single TextBox with an "Add" button and to have a ListBox (or other similar container), so user can click the Add button to add items to the ListBox.

Something like this:

enter image description here

So in this case you would only enable the "Add" button if the data is valid, then when user click "Add", you should add the TextBox.Text to ListBox and then clear the TextBox.Text. Clicking "OK" will eventually take the data from the ListBox and do whatever you needs.

Of course there are many other approaches, I think this one is pretty basic and intuitive.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top