Alignment: CalendarAlignment;
The Alignment property determines the type of alignment of the drop-down calendar relative to the component borders.
Executing the example requires a form with the Button1 button and the Ribbon component named Ribbon1. A tab and a panel are created on the ribbon of the Ribbon1 component.
Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
DTPicker: IRibbonDateTimePicker;
Begin
Self.BeginUpdate;
//Create a control
DTPicker := New RibbonDateTimePicker.Create;
Ribbon1.ActiveCategory.Panels.Item(0).Elements.Add(DTPicker);
//Set up parameters
DTPicker.Alignment := CalendarAlignment.Right;
DTPicker.Checked := True;
DTPicker.InnerWidth := 175;
DTPicker.CurrentDate := DateTime.Today;
DTPicker.MinDate := DateTime.ComposeDay(1950, 1, 1);
DTPicker.MaxDate := DateTime.ComposeDay(2050, 1, 1);
DTPicker.Mode := DateTimePickerExMode.Months;
DTPicker.MonthFormat := MonthStyle.Long;
Self.EndUpdate;
End Sub Button1OnClick;
Clicking the button creates a time and date editor on the active tab panel. Various work parameters will be set up for the editor.
See also: