From eaac057360cb1801c4f8b433411a8c8d1a20a539 Mon Sep 17 00:00:00 2001 From: Olivier Hallot Date: Fri, 12 May 2017 14:11:42 -0300 Subject: Add in BASIC snipets. Change-Id: I484036b9c9694a58f7f113b2cf1c04a1f0e2c4dc Reviewed-on: https://gerrit.libreoffice.org/37552 Reviewed-by: Olivier Hallot Tested-by: Olivier Hallot --- source/text/sbasic/shared/03103800.xhp | 20 ++++++++++++-------- source/text/sbasic/shared/03103900.xhp | 22 +++++++++++++--------- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/source/text/sbasic/shared/03103800.xhp b/source/text/sbasic/shared/03103800.xhp index baea53fc49..eb34752254 100644 --- a/source/text/sbasic/shared/03103800.xhp +++ b/source/text/sbasic/shared/03103800.xhp @@ -37,15 +37,19 @@ Enables an object to be addressed at run-time as a string parameter through the object name. For example, the following command: -MyObj.Prop1.Command = 5 + +MyObj.Prop1.Command = 5 + corresponds to the command block: -Dim ObjVar as Object -Dim ObjProp as Object -ObjName As String = "MyObj" -ObjVar = FindObject( ObjName As String ) -PropName As String = "Prop1" -ObjProp = FindPropertyObject( ObjVar, PropName As String ) -ObjProp.Command = 5 + +Dim ObjVar as Object +Dim ObjProp as Object +ObjName As String = "MyObj" +ObjVar = FindObject( ObjName As String ) +PropName As String = "Prop1" +ObjProp = FindPropertyObject( ObjVar, PropName As String ) +ObjProp.Command = 5 + This allows names to be dynamically created at run-time. For example: "TextEdit1" to TextEdit5" in a loop to create five control names. See also: FindPropertyObject diff --git a/source/text/sbasic/shared/03103900.xhp b/source/text/sbasic/shared/03103900.xhp index f3fd1d339c..127da9c654 100644 --- a/source/text/sbasic/shared/03103900.xhp +++ b/source/text/sbasic/shared/03103900.xhp @@ -37,15 +37,19 @@ Enables objects to be addressed at run-time as a string parameter using the object name. For instance, the command: -MyObj.Prop1.Command = 5 -corresponds to the following command block: -Dim ObjVar as Object -Dim ObjProp as Object -ObjName As String = "MyObj" -ObjVar = FindObject( ObjName As String ) -PropName As String = "Prop1" -ObjProp = FindPropertyObject( ObjVar, PropName As String ) -ObjProp.Command = 5 + + MyObj.Prop1.Command = 5 + +corresponds to the following command block: + +Dim ObjVar as Object +Dim ObjProp as Object +ObjName As String = "MyObj" +ObjVar = FindObject( ObjName As String ) +PropName As String = "Prop1" +ObjProp = FindPropertyObject( ObjVar, PropName As String ) +ObjProp.Command = 5 + To dynamically create Names at run-time, use: "TextEdit1" to TextEdit5" in a loop to create five names. See also: FindObject -- cgit