winforms - Add datetimepicker to StatusStrip control in C# -
i want add together datetimepicker statusstrip command show today's date, there way add together other controls label , progress bar statusstrip control??
yes, check :
https://social.msdn.microsoft.com/forums/windows/en-us/edbd92be-76ee-49b1-b7c6-f6522992a14a/using-toolstripcontrolhost-with-datetimepicker
[toolstripitemdesigneravailability(toolstripitemdesigneravailability.toolstrip)] public class toolstripdatetimepicker : toolstripcontrolhost { private flowlayoutpanel controlpanel; private datetimepicker picker = new datetimepicker(); public toolstripdatetimepicker() : base(new flowlayoutpanel()) { controlpanel = (flowlayoutpanel)base.control; controlpanel.backcolor = color.transparent; autosize = false; controlpanel.controls.add(picker); } public datetime value { { homecoming this.picker.value; } set { this.picker.value = value; } } protected override void onsubscribecontrolevents(control control) { base.onsubscribecontrolevents(control); } protected override void onunsubscribecontrolevents(control control) { base.onunsubscribecontrolevents(control); } }
c# winforms statusstrip
No comments:
Post a Comment