Home Forums WinForms controls Other WinForms controls WinCalendar in DropDown Tool Reply To: WinCalendar in DropDown Tool

User (Old forums)
Post count: 23064

First, there is no documentation because SmartUI was not designed to support derivation.

Second, it can be done, but you would need the source code (the <a href=”http://xceed.com/SmartUI_WinForms_Pricing.html”>Blueprint</a&gt; edition) to be able to do what you want.

Third, even with the source code, we do not guarantee it will do exactly what you need/want. Moreover, we do not provide support for derivation.

However, very roughly, here are some pointers that may help you accomplish what you want.

Create a class derived from Xceed.SmartUI.Forms.DropDownForm : SmartUI will create an instance of this class when the DropDown is invoked. The critical methods are the constructor and OnSettingLocation (to specify the dropdown position by setting the e.Location property).

Create a class derived from Xceed.SmartUI.Controls.ToolBar.Tool (or any other SmartItem including SmartItem itself) : You have to add the Xceed.SmartUI.Attributes.DropDownAttribute with your DropDownForm type to this declaration. For instance :

[ DropDownAttribute( typeof( CalendarForm ) ) ] public class CalendarItem : Tool { }

The problem is that DropDownForm only knows how to handle SmartControl as children. I’m not sure there’s an easy way to feed it an arbitrary control without creating your own SmartControl.

Imported from legacy forums. Posted by André (had 3177 views)