[英]Ploting two controls in one datagridview cell in windows application?
On the datagridview cellclick event i have ploted two controls,one is a combobox that displays weekdays and other is a datetimepicker control. 在datagridview cellclick事件上,我绘制了两个控件,一个是显示工作日的组合框,另一个是datetimepicker控件。 By default both the controls are left aligned hence i am not able to view the date inside datetimepicker control.
默认情况下,两个控件都保持对齐,因此我无法在datetimepicker控件中查看日期。 Hence i changed the property of datetimepicker control to:
因此,我将datetimepicker控件的属性更改为:
dtPickerForFolder.DropDownAlign = LeftRightAlignment.Right;
But the problem is if i set this property i am able to see the date inside datetimepicker control in this format: PM02:57:12.That is in a reverse format. 但是问题是如果我设置了此属性,我可以使用以下格式在datetimepicker控件中查看日期:PM02:57:12。这是相反的格式。
How to solve this issue? 如何解决这个问题?
I am not very good in WinForms, but probably you should add two controls in some container. 我在WinForms中不是很好,但是可能应该在某个容器中添加两个控件。 In WPF it could be StackPanel or something.
在WPF中,它可能是StackPanel或其他东西。 I think WinForms has something similar
我认为WinForms有类似的东西
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.