Home Forums WinForms controls Other WinForms controls WinCalendar in DropDown Tool

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18228 |

    Hi all,
    I am trying to have winCalendar functionality in a dropdown to a toolbox.
    I have tried deriving from smartitem and/or tool and they do not expose dropdown functionality
    There is no documentation on deriving smartUI objects.
    Is there anyone with a little insight on how to implement such behavior?

    Thanks

    Imported from legacy forums. Posted by MiddleTommy (had 2209 views)

    User (Old forums)
    Member
    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.