event LayoutEndChanging (Operation as LayoutChangingEnum)
Notifies your application once the control's layout has been changed.

 TypeDescription 
   Operation as LayoutChangingEnum A LayoutChangingEnum expression that indicates the operation that ends .  
Generally, the LayoutEndChanging event occurs once an UI operation is performed ( ended ). For instance, if the user resizes an event the LayoutEndChanging( exScheduleResizeStartEvent) or LayoutEndChanging( exScheduleResizeEndEvent) may occurs once the user resized an event. Once the operation starts the LayoutStartChanging with the same code ( operation ) is fired. Another sample of using the LayoutStartChanging/LayoutEndChanging events, is to be notified once the user changes the selected dates in the calendar panel or in the schedule view, using the exCalendarSelectionChange or exScheduleSelectionChange. Generally speaking, a LayoutEndChanging(Operation) is preceded by a LayoutStartChanging(Operation).

The LayoutEndChanging event may occurs in the following situations:

Use the Parent property to move the calendar panel to other place.

Syntax for LayoutEndChanging event, /NET version, on:

private void LayoutEndChanging(object sender,exontrol.EXSCHEDULELib.LayoutChangingEnum Operation)
{
}

Private Sub LayoutEndChanging(ByVal sender As System.Object,ByVal Operation As exontrol.EXSCHEDULELib.LayoutChangingEnum) Handles LayoutEndChanging
End Sub

Syntax for LayoutEndChanging event, /COM version, on:

private void LayoutEndChanging(object sender, AxEXSCHEDULELib._IScheduleEvents_LayoutEndChangingEvent e)
{
}

void OnLayoutEndChanging(long Operation)
{
}

void __fastcall LayoutEndChanging(TObject *Sender,Exschedulelib_tlb::LayoutChangingEnum Operation)
{
}

procedure LayoutEndChanging(ASender: TObject; Operation : LayoutChangingEnum);
begin
end;

procedure LayoutEndChanging(sender: System.Object; e: AxEXSCHEDULELib._IScheduleEvents_LayoutEndChangingEvent);
begin
end;

begin event LayoutEndChanging(long Operation)
end event LayoutEndChanging

Private Sub LayoutEndChanging(ByVal sender As System.Object, ByVal e As AxEXSCHEDULELib._IScheduleEvents_LayoutEndChangingEvent) Handles LayoutEndChanging
End Sub

Private Sub LayoutEndChanging(ByVal Operation As EXSCHEDULELibCtl.LayoutChangingEnum)
End Sub

Private Sub LayoutEndChanging(ByVal Operation As Long)
End Sub

LPARAMETERS Operation

PROCEDURE OnLayoutEndChanging(oSchedule,Operation)
RETURN

Syntax for LayoutEndChanging event, /COM version (others), on:

<SCRIPT EVENT="LayoutEndChanging(Operation)" LANGUAGE="JScript">
</SCRIPT>

<SCRIPT LANGUAGE="VBScript">
Function LayoutEndChanging(Operation)
End Function
</SCRIPT>

Procedure OnComLayoutEndChanging OLELayoutChangingEnum llOperation
	Forward Send OnComLayoutEndChanging llOperation
End_Procedure

METHOD OCX_LayoutEndChanging(Operation) CLASS MainDialog
RETURN NIL

void onEvent_LayoutEndChanging(int _Operation)
{
}

function LayoutEndChanging as v (Operation as OLE::Exontrol.Schedule.1::LayoutChangingEnum)
end function

function nativeObject_LayoutEndChanging(Operation)
return

The following two samples shows how to use a separate calendar control, instead the schedule's calendar panel:

Insert the CalendarCombo or eXCalendar to a form, and name it Calendar1. Next, add the eXSchedule component to the same form, and name it to Schedule1. Now, use the following code:

Private Sub Calendar1_SelectionChanged()
    Schedule1.Calendar.Selection = Calendar1.Value
End Sub

Private Sub Form_Load()
    With Schedule1
        .OnResizeControl = 768
        .Calendar.Selection = Calendar1.Value
    End With
End Sub

If you want so synchronize the dates, so once the user clicks another date in the schedule view, you can use a code as follows:

Private Sub Schedule1_MouseDown(Button, Shift, X, Y)
    If (Shift = 0) Then
        If (Button = 1) Then
            With Schedule1
                Dim d As Date
                d = Fix(.DateTimeFromPoint(-1, -1))
                If (d <> 0) Then
                    Calendar1.Value = d
                End If
            End With
        End If
    End If
End Sub

SHIFT + Click the schedule view, and move the view to a new position, and then click. The new date in the calendar is selected. The Fix(.DateTimeFromPoint(-1, -1)) gets the integer part of the date, in other words, just the date from the cursor, not including the time section. The .DateTimeFromPoint(-1, -1) gets the date including the time being clicked.

Insert the eXSchedule control to a form, and name it Calendar1. Next, add a new eXSchedule to the same form, and name it to Schedule1. Now, use the following code:

Private Sub Calendar1_LayoutEndChanging(Operation)
    If (Operation = exCalendarSelectionChange) Then
        Schedule1.Calendar.Selection = Calendar1.Calendar.Selection
    End If
End Sub

Private Sub Form_Load()
    With Calendar1
        .OnResizeControl = 257
    End With
    With Schedule1
        .OnResizeControl = 768
        .Calendar.Selection = Calendar1.Calendar.Selection
    End With
End Sub

If you want so synchronize the dates, so once the user clicks another date in the schedule view, you can use a code as follows:

Private Sub Schedule1_MouseDown(Button, Shift, X, Y)
    If (Shift = 0) Then
        If (Button = 1) Then
            With Schedule1
                Dim d As Date
                d = Fix(.DateTimeFromPoint(-1, -1))
                If (d <> 0) Then
                    Calendar1.Calendar.Selection = d
                End If
            End With
        End If
    End If
End Sub

SHIFT + Click the schedule view, and move the view to a new position, and then click. The new date in the calendar is selected. The Fix(.DateTimeFromPoint(-1, -1)) gets the integer part of the date, in other words, just the date from the cursor, not including the time section. The .DateTimeFromPoint(-1, -1) gets the date including the time being clicked.

The samples changes the Selection property of the Schedule's Calendar object, when the selection is changed in the second ( the calendar ) control.

 

 

 


Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.