c# - How to add button to textbox? -


I'm trying to create a text box with a button on the right my code:

 Public partial class text boxButton: text box {[category ("button")] [description ("button in text box")] Public button button {received {this.btn return}; } Set {this.btn = value; }} Safe Override Zero OnCreateControl () {If it contains. (This control is included. (It's .btn)) {This. Control. Add (this.btn); This.btn.Dock = DockStyle.Right; } Base.OnCreateControl (); }}  

Every time I start my API and set some text or image in the button then it's empty, some thoughts?

Best regards.

You must tell the designer that the properties of this button should also be sorted:

< [Designer Serialization Visibility: Content] Public Button Button {// ...}

The default is hidden, so any of the button properties are Designer Will not be written to the .cs file. The setting, say, works in text properties designer, but after losing the value of the property, you can start the app or reload the form.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -