![]() |
| ||
| How to add DateTimePicker to ToolStrip ? hi every one i need help . How to add DateTimePicker to ToolStrip in my windows form ? if any one can help Nice Thanks, IT_Techno :) |
| ||
| Re: How to add DateTimePicker to ToolStrip ? You can place just about anything on the toolstrip. First (in the IDE) place the desired component on the form (anywhere will do). Provide yourself with a ToolStripControlHost type variable. Then when the form in instantiated, do this:
dtMyDateTimePicker is the component you dropped on the form, and eventually want to live on the tool strip. The hosting variable is instantiated and takes dtMyDateTimePicker as its child. When the new host is added to the toolstrip, the datetime picker goes with it. You can set the properties of the toolstrip collection and the dtTScomponent properties to get the desired appearance. From that point on, you do not need to refer to the dtTScomponent for anything... it is just a host. |
| ||
| Re: How to add DateTimePicker to ToolStrip ? Quote:
Thank you pal it work Correctly |
| ||
| Re: How to add DateTimePicker to ToolStrip ? how i can do the same thing at visual basic i have a visual studio 2005 |
| ||
| Re: How to add DateTimePicker to ToolStrip ? it same... here is the code for vb : Private dtTScomponent As ToolStripControlHost |
| ||
| Re: How to add DateTimePicker to ToolStrip ? thank you very much about your reply but how i can do the same thing at design time you know of course the toolstrip only contain text label combobox button and not contain radio button datetimepicker etc |
| ||
| Re: How to add DateTimePicker to ToolStrip ? The only way I know of to do this at design time is to create a new component that is a subclass of ToolStrip, and then add the extra functionality. Use your new component instead of the ToolStrip. // Jerry |
| All times are GMT -4. The time now is 2:55 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC