hmCal_Set App Property

hmCal_Set App Property(area;reference;property;num;text;date) -> error

Parameter          Type             Description
area               Longint      ->  hmCal area
reference          Longint      ->  appointment reference
property           Longint      ->  property to set
num                Longint      ->  numeric value to set
text               Text         ->  text value to set
date               Datum        ->  date value to set
error              Longint      <-  errorcode

Contents

Description

With the command hmCal_Set App Property you can set several properties of an appointment. In the parameter reference you must pass an appointment id or just pass 0 to set the property for all appointments. You can use one of the following properties.

Notice: You can use predefined Constants.

To get all properties you can use the command hmCal_Get App Property.

Important: You must always set all parameters of the command. If you use not all parameters (num,text,date) you must pass an empty value.

Property

hmCal_aprop_ID (1)

You can set a new ID for an appointment. Pass the new reference in parameter num.

hmCal_aprop_CalendarID (2)

With this property you can set the calendar id for an appointment. Pass the calendar id in parameter num.

hmCal_aprop_Textheader (3)

With this property you can set the headertext. Pass the new headertext in parameter text.

hmCal_aprop_Textbody (4)

With this property you can set the descriptiontext. Pass the new descriptiontext in parameter text.

hmCal_aprop_Tiptext (5)

With this property you can set the tiptext. Pass the new tiptextin parameter text.

hmCal_aprop_AllDay (6)

With this property you can set the allday flag of an appointment. Set 1 for allday and 0 for not allday in parameter num.

hmCal_aprop_DateFrom (7)

With this property you can set the from date. Pass the new date in the parameter date.

hmCal_aprop_DateTo (8)

With this property you can set the to date. Pass the new date in the parameter date.

hmCal_aprop_TimeFrom (9)

With this property you can set the from time. Pass the new time in seconds 0-86399) in the parameter num.

hmCal_aprop_TimeTo (10)

With this property you can set the to time. Pass the new time in seconds 0-86399) in the parameter num.

hmCal_aprop_Effect (11)

With this property you can set the effect of an appointment. Just pass the effect id in the parameter num. The following effects are available:


You can use the predefined Constants.


hmCal_Effect_Normal (0), hmCal_Effect_Dim (1), hmCal_Effect_Fading (2), hmCal_Effect_LeftBar (3)

If you use the effect hmCal_Effect_LeftBar, you can also define the width of the bar. You can define the width by calling the command hmCal_SET AREA PROPERTY with the selector hmCal_prop_LeftBarWidth and the width as value.

hmCal_aprop_DoneStatus (12)

With this property you can set the done status of an appointment. You must set a value between 0 and 100 in the parameter num. This property is only valid for the project view.

hmCal_aprop_Milestone (13)

With this property you can define, if the appointment is an milestone or not. Pass 1 for milestone and 0 for not milestone in the parameter num. This property is only valid for the project view.

hmCal_aprop_Icon (14)

With this property you can set the icon id of an icon you have already created with the command hmCal_Add Icon. You pass the icon id in the parameter num.

Pass a 0 as icon id, no icon is set.

Pass a -1 as icon id, the standard reminder icon is used.

Pass a -2 as icon id, the standard recurrence icon is used.

hmCal_aprop_Lock (15)

The property defines if an appointment is locked or not. Pass 1 for locked and 0 for unlocked in the parameter num. Locked appointments cannot by drag and drop from the user.

hmCal_aprop_SupAppointment (16)

The property defines the superior appointment. Pass the superior appointment id in the parameter num.

Hierarchical appointments are only visible in the project view.

hmCal_aprop_HeaderVisible (17)

The property defines if the appointment header is visible or not. Pass 1 for visible and 0 for invisible in the parameter num.


Left: invisible header, right: visible header.

hmCal_aprop_TimeVisible (18)

The property defines if the time in the appointment header is visible or not. Pass 1 for visible and 0 for invisible in the parameter num.


Left: invisible time in header, right: visible time in header.

hmCal_aprop_ShowCurrentTime (19)

This property actives a second bar under the regular appointment bar in the project view. You must set the time range with the selectors 20,21,22 and 23.

Example:


hmCal_aprop_CurrDateFrom (20)

With this property you can set the current from date. Pass the new date in the parameter date. This property is only valid in the project view and in combination with the selector 19.

hmCal_aprop_CurrDateTo (21)

With this property you can set the current to date. Pass the new date in the parameter date. This property is only valid in the project view and in combination with the selector 19.

hmCal_aprop_CurrTimeFrom (22)

With this property you can set the current from time. Pass the new time in seconds 0-86399) in the parameter num. This property is only valid in the project view and in combination with the selector 19.

hmCal_aprop_CurrTimeTo (23)

With this property you can set the current to time. Pass the new time in seconds 0-86399) in the parameter num. This property is only valid in the project view and in combination with the selector 19.

hmCal_aprop_Location (24)

With this property you can get and set the location of the appointment. The location is used if you export or import appointments.

hmCal_aprop_Expand (25)

With this property you can expand or collapse the appointment in the project view. Pass 1 for expand in the parameter num or pass 0 for collapse.

hmCal_aprop_Priority (26)

With this property you can set the priority for the appointment. Pass a value between 0 and 9 to the parameter num. A value of zero specifies an undefined priority. A value of one is the highest priority. A value of two is the second highest priority. Subsequent numbers specify a decreasing ordinal priority. A value of nine is the lowest priority. The priority is used if the export and import of appointments.

hmCal_aprop_UID (27)

With this property you can set the unique, global ID of the appointment. hmCal creates automatically internal id of the appointment for export and import purposes. The id look like TNTDVXDVAPBRDPJVAXLH@heubach-media.de.

hmCal_aprop_URL (28)

With this property you can get and set the url of the appointment. The url is used if you export or import appointments.

hmCal_aprop_Independent (29)

With this property you can set the independence of a parent appointment in the project view. If you pass 1 the parent appointment is moveable and resizeable and is independent of their children appointments and vice versa.

hmCal_aprop_DrawAsRect (30)

With this property you can define, if the appointment should draw as a rectangle. Standard is a value of 0. The times of the appointment is not changed. The property only changed the view/display of the appointment!

Example with the num value of 0 (Standard):


Example with the num value of 1:


hmCal_aprop_HasSubApps (31)

The property returns if the appointment has subordinated appointments. This property is only valid in the project view and can only be read.

hmCal_aprop_Icon2 (32)

With this property you can set a second icon for an appointment. See also selector 14 hmCal_aprop_Icon.

The following code adds two icons to an appointment:

$vl_error:=hmCal_Set App Property ($vl_area;1;hmCal_aprop_Icon ;-1;"";!00.00.00!)
$vl_error:=hmCal_Set App Property ($vl_area;1;hmCal_aprop_Icon2 ;-2;"";!00.00.00!)



hmCal_aprop_Icon3 (33)

With this property you can set a third icon for an appointment. See also selector 14 hmCal_aprop_Icon.

hmCal_aprop_TextheaderMS (34)

With this property you can set, if the header text of the appointment should be interpret as multi style or not. Pass 1 for interpretation as multi style or 0 for not multi style.

hmCal_aprop_TextbodyMS (35)

With this property you can set, if the body text of the appointment should be interpret as multi style or not. Pass 1 for interpretation as multi style or 0 for not multi style.

hmCal_aprop_UseGradient (36)

With this property you can activate a custom gradient for the appointment. The gradient must be defined with the command hmCal_SET APP GRADIENT. Don't forget to set the property hmCal_aprop_Effect to hmCal_Effect_Fading to show the gradient.

Example

The following example detect the end date of an appointment (id 26) and extend the end date for two days:

C_LONGINT($vl_prop_long)
C_TEXT($vt_prop_text)
C_DATE($vd_prop_date)

$vl_prop_long:=0
$vt_prop_text:=""
$vd_prop_date:=!00.00.00!
$vl_error:=hmCal_Get App Property (calArea;26;hmCal_aprop_DateTo ;$vl_prop_long;$vt_prop_text;$vd_prop_date)

$vd_prop_date:=$vd_prop_date+2

$vl_error:=hmCal_Set App Property (calArea;26;hmCal_aprop_DateTo ;$vl_prop_long;$vt_prop_text;$vd_prop_date)