Click the button to replace the picture in the Label
-
Button 1: click PushButton1 to obtain the local image and display it in the TextLabel.(Function has been realized)
Button 2:Click button 2 to replace the picture with the corresponding name in the label (for example, when clicking button 1, the picture with the name "A" will be displayed on the screen, and the picture with the name "A1" under the corresponding path will be found for replacement; if it is B, B1 will be found for replacement)
The function of button 2 will not be realized. Ask the teacher how to write this function -
Button 1: click PushButton1 to obtain the local image and display it in the TextLabel.(Function has been realized)
Button 2:Click button 2 to replace the picture with the corresponding name in the label (for example, when clicking button 1, the picture with the name "A" will be displayed on the screen, and the picture with the name "A1" under the corresponding path will be found for replacement; if it is B, B1 will be found for replacement)
The function of button 2 will not be realized. Ask the teacher how to write this function@jinnea said in Click the button to replace the picture in the Label:
The function of button 2 will not be realized. Ask the teacher how to write this function
But we're not teachers... it's a task you have to do, we won't write code for you.
Please post what you already tried and explain where you got problems.