简体   繁体   English

日历在DateTimePicker控件中的位置

[英]Position of Calendar in DateTimePicker Control

I am using dateTimePicker control of .Net framework 4.0 using C# and want it to behave a bit differently than its default behavior. 我正在使用C#使用.Net Framework 4.0的dateTimePicker控件,并希望它的行为与其默认行为有所不同。 After clicking on the calendar button, in default behavior calendar is shown in the bottom of the control. 单击日历按钮后,默认行为日历将显示在控件底部。 I want to modify it so that the calendar appears on top of the dateTimePicker control in windows forms application. 我想对其进行修改,以便日历显示在Windows窗体应用程序的dateTimePicker控件的顶部。

Any suggestion? 有什么建议吗?

If you are using DateTimePicker class from System.Windows.Forms then you will find four properties named Right , Left , Top , Bottom . 如果使用System.Windows.Forms DateTimePicker类,则将找到四个名为RightLeftTopBottom属性。 Using this properties you can set the distance of your calender control in pixels from the corresponding margin of your container's client area. 使用此属性,您可以设置压延控件到容器客户区域相应边距的距离(以像素为单位)。 You can also set the Width property. 您还可以设置Width属性。

For more about the properties, check this - link 有关属性的更多信息,请选中此- 链接

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM