property Calendar.TemplateDef as Variant
Defines inside variables for the next Template/ExecuteTemplate call.

 TypeDescription 
   Variant A string expression that indicates the Dim declaration, or any Object expression to be assigned to previously declared variables.  
The TemplateDef property has been added to allow programming languages such as dBASE Plus to set control's properties with multiple parameters. It is known that programming languages such as dBASE Plus or XBasic from AlphaFive, does not support setting a property with multiple parameters. In other words, these programming languages does not support something like Property(Parameters) = Value, so our controls provide an alternative using the TemplateDef method. The first call of the TemplateDef should be a declaration such as "Dim a,b" which means the next 2 calls of the TemplateDef defines the variables a and b. The next call should be Template or ExecuteTemplate property which can use the variable a and b being defined previously. 

dBASE Plus How do I show the tooltip quicker?

local oCalendar,var_Event

oCalendar = form.Activex1.nativeObject
oCalendar.ToolTipDelay = 1
// oCalendar.Events.Add(oCalendar.Date).Comment = "This is a text that shows up when the cursor hovers the date"
var_Event = oCalendar.Events.Add(oCalendar.Date)
with (oCalendar)
	TemplateDef = [Dim var_Event]
	TemplateDef = var_Event
	Template = [var_Event.Comment = "This is a text that shows up when the cursor hovers the date"]
endwith
oCalendar.HideSelection = true
XBasic (Alpha Five) How do I show the tooltip quicker?
Dim oCalendar as P
Dim var_Event as P

oCalendar = topparent:CONTROL_ACTIVEX1.activex
oCalendar.ToolTipDelay = 1
' oCalendar.Events.Add(oCalendar.Date).Comment = "This is a text that shows up when the cursor hovers the date"
var_Event = oCalendar.Events.Add(oCalendar.Date)
oCalendar.TemplateDef = "Dim var_Event"
oCalendar.TemplateDef = var_Event
oCalendar.Template = "var_Event.Comment = \"This is a text that shows up when the cursor hovers the date\""

oCalendar.HideSelection = .t.

The TemplateDef, Template and ExecuteTemplate support x-script language ( Template script of the Exontrols ), like explained bellow:

The Template or x-script is composed by lines of instructions. Instructions are separated by "\n\r" ( newline characters ) or ";" character. The ; character may be available only for newer versions of the components.

An x-script instruction/line can be one of the following:

The x-script may uses constant expressions as follow:

Also , the template or x-script code may support general functions as follows:

 

 


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