I’m building a program that shows the heads of twenty articles in twenty buttons. After pressing a button a window containing the corresponding text of the article is to be shown.
For each button a function is needed. Do I need to make twenty functions or is it possible to use one? I like the idea of the latter, but I have no clue how to find out which button was pressed. The function call accepts no parameters.
How do I know which button?