c# - How to use controls from derived class in base window class -


this question has answer here:

i creating base window class want use store common code our windows. know windows have text box , combo box used same purpose.

public abstract class windowbase : window {  protected virtual void savetextboxvalue() { }  protected textbox textboxnotes { get; set; } }  public class mywindow : windowbase { public mywindow() { initializecomponent(); textboxnotes = txtnotes; // have set in every inherited class } } 

is there way use textbox mywindow classes without need set in every conrete class?

in constructor of abstract class set finding first textbox in window or whatever way u want identify text box.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -