For example, I want to design a button, including a PictureBox and a Label, as follows:
Want to realize the function of the is: When I was in the use of the user control, can modify the picture and style, That is to say, in the right properties, can choose a picture, can modify the text of the display,
User controls can I do now, but no way to modify the display images and text, as well as the font size, etc.,
CodePudding user response:
Assign custom controls in the control a Name like that PIC and lab After using custom controls set a Name such as call button Use the button in the background. The PIC and button. Lab can directly manipulate custom internal controls
CodePudding user response:
Simply put the object Public out let users to use the code to assign a value to modify
But I see you mean is to want to let the user on the designer modify
This designer attributes. I don't is changshu.
But temporary solution is that you put this picture button object exposed to the user to go The user can write code assignment up
Like the designer design before
Now like to use the code to layout it...
So habit is to use code incoming parameters such as means to complete.