I have a form called inspections with quite a few buttons, each button is named according to an inspection document that the button opens.
I want to sort the buttons left to right (A-Z order)then filling up the rest of the page. I would like it to happen automatically after adding a new button and putting the (text) documents name on the button.
It just becomes difficult to keep moving the buttons around in order for it to be alphabetically sorted.
If you need only to store inspection documents in a A-Z order and the possibility to open those documents again. Then I should propose a Listbox.
The ListBox control enables you to display a list of items to the user that the user can select by clicking. A ListBox control can provide single or multiple selections using the SelectionMode property. The ListBox also provides the MultiColumn property to enable the display of items in columns instead of a straight vertical list of items. With this, the control can display more visible items and the user no longer needs to scroll to an item.
It is generally a bad idea to hard code your files or addresses or things like that in a program. It is always a pain to update your addresses and of course add new.
I suggest you follow Luc001's suggestion with a ListBox (Or a DataGridView if you like them better) and a datasource like an excel file or an access db. This way when you want to add a new document you can just add the title and the address to your datasource and be done with it, without changing your code or having to compile it again.