1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE script:module PUBLIC
"-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3 <script:module xmlns:
script=
"http://openoffice.org/2000/script" script:
name=
"PropertiesGet" script:
language=
"StarBasic">REM =======================================================================================================================
4 REM === The Access2Base library is a part of the LibreOffice project. ===
5 REM === Full documentation is available on http://www.access2base.com ===
6 REM =======================================================================================================================
10 REM -----------------------------------------------------------------------------------------------------------------------
11 Public Function getAbsolutePosition(Optional pvObject As Variant) As Boolean
12 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getAbsolutePosition
")
13 getAbsolutePosition = PropertiesGet._getProperty(pvObject,
"AbsolutePosition
")
14 End Function
' getAbsolutePosition
16 REM -----------------------------------------------------------------------------------------------------------------------
17 Public Function getAllowAdditions(Optional pvObject As Variant) As Boolean
18 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getAllowAdditions
")
19 getAllowAdditions = PropertiesGet._getProperty(pvObject,
"AllowAdditions
")
20 End Function
' getAllowAdditions
22 REM -----------------------------------------------------------------------------------------------------------------------
23 Public Function getAllowDeletions(Optional pvObject As Variant) As Boolean
24 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getAllowDeletions
")
25 getAllowDeletions = PropertiesGet._getProperty(pvObject,
"AllowDeletions
")
26 End Function
' getAllowDeletions
28 REM -----------------------------------------------------------------------------------------------------------------------
29 Public Function getAllowEdits(Optional pvObject As Variant) As Boolean
30 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getAllowEdits
")
31 getAllowEdits = PropertiesGet._getProperty(pvObject,
"AllowEdits
")
32 End Function
' getAllowEdits
34 REM -----------------------------------------------------------------------------------------------------------------------
35 Public Function getBackColor(Optional pvObject As Variant) As Variant
36 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBackColor
")
37 getBackColor = PropertiesGet._getProperty(pvObject,
"BackColor
")
38 End Function
' getBackColor
40 REM -----------------------------------------------------------------------------------------------------------------------
41 Public Function getBeginGroup(Optional pvObject As Variant) As Variant
42 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBeginGroup
")
43 getBeginGroup = PropertiesGet._getProperty(pvObject,
"BeginGroup
")
44 End Function
' getBeginGroup
46 REM -----------------------------------------------------------------------------------------------------------------------
47 Public Function getBOF(Optional pvObject As Variant) As Variant
48 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBOF
")
49 getBOF = PropertiesGet._getProperty(pvObject,
"BOF
")
50 End Function
' getBOF
52 REM -----------------------------------------------------------------------------------------------------------------------
53 Public Function getBookmark(Optional pvObject As Variant) As Variant
54 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBookmark
")
55 getBookmark = PropertiesGet._getProperty(pvObject,
"Bookmark
")
56 End Function
' getBookmark
58 REM -----------------------------------------------------------------------------------------------------------------------
59 Public Function getBookmarkable(Optional pvObject As Variant) As Variant
60 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBookmarkable
")
61 getBookmarkable = PropertiesGet._getProperty(pvObject,
"Bookmarkable
")
62 End Function
' getBookmarkable
64 REM -----------------------------------------------------------------------------------------------------------------------
65 Public Function getBorderColor(Optional pvObject As Variant) As Variant
66 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBorderColor
")
67 getBorderColor = PropertiesGet._getProperty(pvObject,
"BorderColor
")
68 End Function
' getBorderColor
70 REM -----------------------------------------------------------------------------------------------------------------------
71 Public Function getBorderStyle(Optional pvObject As Variant) As Variant
72 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBorderStyle
")
73 getBorderStyle = PropertiesGet._getProperty(pvObject,
"BorderStyle
")
74 End Function
' getBorderStyle
76 REM -----------------------------------------------------------------------------------------------------------------------
77 Public Function getBuiltIn(Optional pvObject As Variant) As Boolean
78 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getBuiltIn
")
79 getBuiltIn = PropertiesGet._getProperty(pvObject,
"BuiltIn
")
80 End Function
' getBuiltIn
82 REM -----------------------------------------------------------------------------------------------------------------------
83 Public Function getButtonLeft(Optional pvObject As Variant) As Boolean
84 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getButtonLeft
")
85 getButtonLeft = PropertiesGet._getProperty(pvObject,
"ButtonLeft
")
86 End Function
' getButtonLeft
88 REM -----------------------------------------------------------------------------------------------------------------------
89 Public Function getButtonMiddle(Optional pvObject As Variant) As Boolean
90 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getButtonMiddle
")
91 getButtonMiddle = PropertiesGet._getProperty(pvObject,
"ButtonMiddle
")
92 End Function
' getButtonMiddle
94 REM -----------------------------------------------------------------------------------------------------------------------
95 Public Function getButtonRight(Optional pvObject As Variant) As Boolean
96 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getButtonRight
")
97 getButtonRight = PropertiesGet._getProperty(pvObject,
"ButtonRight
")
98 End Function
' getButtonRight
100 REM -----------------------------------------------------------------------------------------------------------------------
101 Public Function getCancel(Optional pvObject As Variant) As Variant
102 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getCancel
")
103 getCancel = PropertiesGet._getProperty(pvObject,
"Cancel
")
104 End Function
' getCancel
106 REM -----------------------------------------------------------------------------------------------------------------------
107 Public Function getCaption(Optional pvObject As Variant) As Variant
108 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getCaption
")
109 getCaption = PropertiesGet._getProperty(pvObject,
"Caption
")
110 End Function
' getCaption
112 REM -----------------------------------------------------------------------------------------------------------------------
113 Public Function getClickCount(Optional pvObject As Variant) As Long
114 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getClickCount
")
115 getClickCount = PropertiesGet._getProperty(pvObject,
"ClickCount
")
116 End Function
' getClickCount
118 REM -----------------------------------------------------------------------------------------------------------------------
119 Public Function getContextShortcut(Optional pvObject As Variant) As String
120 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getContextShortcut
")
121 getContextShortcut = PropertiesGet._getProperty(pvObject,
"ContextShortcut
")
122 End Function
' getContextShortcut
124 REM -----------------------------------------------------------------------------------------------------------------------
125 Public Function getControlSource(Optional pvObject As Variant) As Variant
126 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getControlSource
")
127 getControlSource = PropertiesGet._getProperty(pvObject,
"ControlSource
")
128 End Function
' getControlSource
130 REM -----------------------------------------------------------------------------------------------------------------------
131 Public Function getControlTipText(Optional pvObject As Variant) As Variant
132 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getControlTipText
")
133 getControlTipText = PropertiesGet._getProperty(pvObject,
"ControlTipText
")
134 End Function
' getControlTipText
136 REM -----------------------------------------------------------------------------------------------------------------------
137 Public Function getControlType(Optional pvObject As Variant) As Integer
138 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getControlType
")
139 getControlType = PropertiesGet._getProperty(pvObject,
"ControlType
")
140 End Function
' getControlType
142 REM -----------------------------------------------------------------------------------------------------------------------
143 Public Function getCount(Optional pvObject As Variant) As Integer
144 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getCount
")
145 getCount = PropertiesGet._getProperty(pvObject,
"Count
")
146 End Function
' getCount
148 REM -----------------------------------------------------------------------------------------------------------------------
149 Public Function getCurrentRecord(Optional pvObject As Variant) As Variant
150 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getCurrentRecord
")
151 getCurrentRecord = PropertiesGet._getProperty(pvObject,
"CurrentRecord
")
152 End Function
' getCurrentRecord
154 REM -----------------------------------------------------------------------------------------------------------------------
155 Public Function getDataType(Optional pvObject As Variant) As Variant
156 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDataType
")
157 getDataType = PropertiesGet._getProperty(pvObject,
"DataType
")
158 End Function
' getDataType
160 REM -----------------------------------------------------------------------------------------------------------------------
161 Public Function getDbType(Optional pvObject As Variant) As Variant
162 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDbType
")
163 getDbType = PropertiesGet._getProperty(pvObject,
"DbType
")
164 End Function
' getDbType
166 REM -----------------------------------------------------------------------------------------------------------------------
167 Public Function getDefault(Optional pvObject As Variant) As Variant
168 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDefault
")
169 getDefault = PropertiesGet._getProperty(pvObject,
"Default
")
170 End Function
' getDefault
172 REM -----------------------------------------------------------------------------------------------------------------------
173 Public Function getDefaultValue(Optional pvObject As Variant) As Variant
174 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDefaultValue
")
175 getDefaultValue = PropertiesGet._getProperty(pvObject,
"DefaultValue
")
176 End Function
' getDefaultValue
178 REM -----------------------------------------------------------------------------------------------------------------------
179 Public Function getDescription(Optional pvObject As Variant) As Variant
180 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getDescription
")
181 getDescription = PropertiesGet._getProperty(pvObject,
"Description
")
182 End Function
' getDescription
184 REM -----------------------------------------------------------------------------------------------------------------------
185 Public Function getEditMode(Optional pvObject As Variant) As Variant
186 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEditMode
")
187 getEditMode = PropertiesGet._getProperty(pvObject,
"EditMode
")
188 End Function
' getEditMode
190 REM -----------------------------------------------------------------------------------------------------------------------
191 Public Function getEnabled(Optional pvObject As Variant) As Variant
192 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEnabled
")
193 getEnabled = PropertiesGet._getProperty(pvObject,
"Enabled
")
194 End Function
' getEnabled
196 REM -----------------------------------------------------------------------------------------------------------------------
197 Public Function getEOF(Optional pvObject As Variant) As Variant
198 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEOF
")
199 getEOF = PropertiesGet._getProperty(pvObject,
"EOF
")
200 End Function
' getEOF
202 REM -----------------------------------------------------------------------------------------------------------------------
203 Public Function getEventName(Optional pvObject As Variant) As String
204 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEventName
")
205 getEventName = PropertiesGet._getProperty(pvObject,
"EventName
")
206 End Function
' getEventName
208 REM -----------------------------------------------------------------------------------------------------------------------
209 Public Function getEventType(Optional pvObject As Variant) As String
210 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getEventType
")
211 getEventType = PropertiesGet._getProperty(pvObject,
"EventType
")
212 End Function
' getEventType
214 REM -----------------------------------------------------------------------------------------------------------------------
215 Public Function getFieldSize(Optional pvObject As Variant) As Variant
216 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFieldSize
")
217 getFieldSize = PropertiesGet._getProperty(pvObject,
"FieldSize
")
218 End Function
' getFieldSize
220 REM -----------------------------------------------------------------------------------------------------------------------
221 Public Function getFilter(Optional pvObject As Variant) As String
222 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFilter
")
223 getFilter = PropertiesGet._getProperty(pvObject,
"Filter
")
224 End Function
' getFilter
226 REM -----------------------------------------------------------------------------------------------------------------------
227 Public Function getFilterOn(Optional pvObject As Variant) As Boolean
228 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFilterOn
")
229 getFilterOn = PropertiesGet._getProperty(pvObject,
"FilterOn
")
230 End Function
' getFilterOn
232 REM -----------------------------------------------------------------------------------------------------------------------
233 Public Function getFocusChangeTemporary(Optional pvObject As Variant) As Boolean
234 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFocusChangeTemporary
")
235 getFocusChangeTemporary = PropertiesGet._getProperty(pvObject,
"FocusChangeTemporary
")
236 End Function
' getFocusChangeTemporary
238 REM -----------------------------------------------------------------------------------------------------------------------
239 Public Function getFontBold(Optional pvObject As Variant) As Variant
240 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontBold
")
241 getFontBold = PropertiesGet._getProperty(pvObject,
"FontBold
")
242 End Function
' getFontBold
244 REM -----------------------------------------------------------------------------------------------------------------------
245 Public Function getFontItalic(Optional pvObject As Variant) As Variant
246 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontItalic
")
247 getFontItalic = PropertiesGet._getProperty(pvObject,
"FontItalic
")
248 End Function
' getFontItalic
250 REM -----------------------------------------------------------------------------------------------------------------------
251 Public Function getFontName(Optional pvObject As Variant) As Variant
252 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontName
")
253 getFontName = PropertiesGet._getProperty(pvObject,
"FontName
")
254 End Function
' getFontName
256 REM -----------------------------------------------------------------------------------------------------------------------
257 Public Function getFontSize(Optional pvObject As Variant) As Variant
258 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontSize
")
259 getFontSize = PropertiesGet._getProperty(pvObject,
"FontSize
")
260 End Function
' getFontSize
262 REM -----------------------------------------------------------------------------------------------------------------------
263 Public Function getFontUnderline(Optional pvObject As Variant) As Variant
264 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontUnderline
")
265 getFontUnderline = PropertiesGet._getProperty(pvObject,
"FontUnderline
")
266 End Function
' getFontUnderline
268 REM -----------------------------------------------------------------------------------------------------------------------
269 Public Function getFontWeight(Optional pvObject As Variant) As Variant
270 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFontWeight
")
271 getFontWeight = PropertiesGet._getProperty(pvObject,
"FontWeight
")
272 End Function
' getFontWeight
274 REM -----------------------------------------------------------------------------------------------------------------------
275 Public Function getForm(Optional pvObject As Variant) As Variant
' Return Subform pseudo
276 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getForm
")
277 getForm = PropertiesGet._getProperty(pvObject,
"Form
")
278 End Function
' getForm
280 REM -----------------------------------------------------------------------------------------------------------------------
281 Public Function getFormat(Optional pvObject As Variant) As Variant
282 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getFormat
")
283 getFormat = PropertiesGet._getProperty(pvObject,
"Format
")
284 End Function
' getFormat
286 REM -----------------------------------------------------------------------------------------------------------------------
287 Public Function getHeight(Optional pvObject As Variant) As Long
288 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getHeight
")
289 getHeight = PropertiesGet._getProperty(pvObject,
"Height
")
290 End Function
' getHeight
292 REM -----------------------------------------------------------------------------------------------------------------------
293 Public Function getForeColor(Optional pvObject As Variant) As Variant
294 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getForeColor
")
295 getForeColor = PropertiesGet._getProperty(pvObject,
"ForeColor
")
296 End Function
' getForeColor
298 REM -----------------------------------------------------------------------------------------------------------------------
299 Public Function getIsLoaded(Optional pvObject As Variant) As Boolean
300 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getIsLoaded
")
301 getIsLoaded = PropertiesGet._getProperty(pvObject,
"IsLoaded
")
302 End Function
' getIsLoaded
304 REM -----------------------------------------------------------------------------------------------------------------------
305 Public Function getItemData(Optional pvObject As Variant, ByVal Optional pvIndex As Variant) As Variant
306 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getItemData
")
307 If IsMissing(pvIndex) Then
308 getItemData = PropertiesGet._getProperty(pvObject,
"ItemData
")
310 getItemData = PropertiesGet._getProperty(pvObject,
"ItemData
", pvIndex)
312 End Function
' getItemData
314 REM -----------------------------------------------------------------------------------------------------------------------
315 Public Function getKeyAlt(Optional pvObject As Variant) As Boolean
316 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyAlt
")
317 getKeyAlt = PropertiesGet._getProperty(pvObject,
"KeyAlt
")
318 End Function
' getKeyAlt
320 REM -----------------------------------------------------------------------------------------------------------------------
321 Public Function getKeyChar(Optional pvObject As Variant) As String
322 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyChar
")
323 getKeyChar = PropertiesGet._getProperty(pvObject,
"KeyChar
")
324 End Function
' getKeyChar
326 REM -----------------------------------------------------------------------------------------------------------------------
327 Public Function getKeyCode(Optional pvObject As Variant) As Integer
328 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyCode
")
329 getKeyCode = PropertiesGet._getProperty(pvObject,
"KeyCode
")
330 End Function
' getKeyCode
332 REM -----------------------------------------------------------------------------------------------------------------------
333 Public Function getKeyCtrl(Optional pvObject As Variant) As Boolean
334 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyCtrl
")
335 getKeyCtrl = PropertiesGet._getProperty(pvObject,
"KeyCtrl
")
336 End Function
' getKeyCtrl
338 REM -----------------------------------------------------------------------------------------------------------------------
339 Public Function getKeyFunction(Optional pvObject As Variant) As Integer
340 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyFunction
")
341 getKeyFunction = PropertiesGet._getProperty(pvObject,
"KeyFunction
")
342 End Function
' getKeyFunction
344 REM -----------------------------------------------------------------------------------------------------------------------
345 Public Function getKeyShift(pvObject As Variant) As Boolean
346 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getKeyShift
")
347 getKeyShift = PropertiesGet._getProperty(pvObject,
"KeyShift
")
348 End Function
' getKeyShift
350 REM -----------------------------------------------------------------------------------------------------------------------
351 Public Function getLinkChildFields(Optional pvObject As Variant, ByVal Optional pvIndex As Variant) As Variant
352 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getLinkChildFields
")
353 If IsMissing(pvObject) Then
354 getLinkChildFields = PropertiesGet._getProperty(pvObject,
"LinkChildFields
")
356 getLinkChildFields = PropertiesGet._getProperty(pvObject,
"LinkChildFields
", pvIndex)
358 End Function
' getLinkChildFields
360 REM -----------------------------------------------------------------------------------------------------------------------
361 Public Function getLinkMasterFields(Optional pvObject As Variant, ByVal Optional pvIndex As Variant) As Variant
362 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getLinkMasterFields
")
363 If IsMissing(pvIndex) Then
364 getLinkMasterFields = PropertiesGet._getProperty(pvObject,
"LinkMasterFields
")
366 getLinkMasterFields = PropertiesGet._getProperty(pvObject,
"LinkMasterFields
", pvIndex)
368 End Function
' getLinkMasterFields
370 REM -----------------------------------------------------------------------------------------------------------------------
371 Public Function getListCount(Optional pvObject As Variant) As Variant
372 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getListCount
")
373 getListCount = PropertiesGet._getProperty(pvObject,
"ListCount
")
374 End Function
' getListCount
376 REM -----------------------------------------------------------------------------------------------------------------------
377 Public Function getListIndex(Optional pvObject As Variant) As Variant
378 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getListIndex
")
379 getListIndex = PropertiesGet._getProperty(pvObject,
"ListIndex
")
380 End Function
' getListIndex
382 REM -----------------------------------------------------------------------------------------------------------------------
383 Public Function getLocked(Optional pvObject As Variant) As Variant
384 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getLocked
")
385 getLocked = PropertiesGet._getProperty(pvObject,
"Locked
")
386 End Function
' getLocked
388 REM -----------------------------------------------------------------------------------------------------------------------
389 Public Function getMultiSelect(Optional pvObject As Variant) As Variant
390 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getMultiSelect
")
391 getMultiSelect = PropertiesGet._getProperty(pvObject,
"MultiSelect
")
392 End Function
' getMultiSelect
394 REM -----------------------------------------------------------------------------------------------------------------------
395 Public Function getName(Optional pvObject As Variant) As String
396 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getName
")
397 getName = PropertiesGet._getProperty(pvObject,
"Name
")
398 End Function
' getName
400 REM -----------------------------------------------------------------------------------------------------------------------
401 Public Function getObject(Optional pvShortcut As Variant) As Variant
402 ' Return the object described by pvShortcut ignoring its final property
403 ' Example:
"Forms!myForm!myControl.myProperty
" =
> Controls(Forms(
"myForm
"),
"myControl
"))
405 Const cstEXCLAMATION =
"!
"
406 Const cstDOT =
".
"
408 If _ErrorHandler() Then On Local Error Goto Error_Function
409 Const cstThisSub =
"getObject
"
410 Utils._SetCalledSub(cstThisSub)
411 If IsMissing(pvShortcut) Then Call _TraceArguments()
412 If Not Utils._CheckArgument(pvShortcut,
1, vbString) Then Goto Exit_Function
414 Dim iCurrentIndex As Integer, vCurrentObject As Variant, sCurrentProperty As String
415 Dim sComponents() As String, sSubComponents() As String, sDialog As String
417 Set vCurrentObject = Nothing
418 sComponents = Split(Trim(pvShortcut), cstEXCLAMATION)
419 If UBound(sComponents) =
0 Then Goto Trace_Error
420 If Not Utils._InList(UCase(sComponents(
0)), Array(
"FORMS
",
"DIALOGS
",
"TEMPVARS
")) Then Goto Trace_Error
421 If sComponents(
1) =
"0" Or Left(sComponents(
1),
2) =
"0.
" Then
422 Set oDoc = _A2B_.CurrentDocument()
423 If oDoc.DbConnect = DBCONNECTFORM Then sComponents(
1) = oDoc.DbContainers(
0).FormName Else Goto Trace_Error
426 sSubComponents = Split(sComponents(UBound(sComponents)), cstDOT)
427 sComponents(UBound(sComponents)) = sSubComponents(
0)
' Ignore final property, if any
429 Set vCurrentObject = New Collect
430 Select Case UCase(sComponents(
0))
431 Case
"FORMS
" : vCurrentObject._CollType = COLLFORMS
432 Case
"DIALOGS
" : vCurrentObject._CollType = COLLALLDIALOGS
433 Case
"TEMPVARS
" : vCurrentObject._CollType = COLLTEMPVARS
435 For iCurrentIndex =
1 To UBound(sComponents)
' Start parsing ...
436 sSubComponents = Split(sComponents(iCurrentIndex), cstDOT)
437 sComponents(iCurrentIndex) = Utils._Trim(sSubComponents(
0))
438 Select Case UBound(sSubComponents)
440 sCurrentProperty =
""
442 sCurrentProperty = sSubComponents(
1)
446 Select Case vCurrentObject._Type
448 Select Case vCurrentObject._CollType
450 vCurrentObject = Application.Forms(sComponents(iCurrentIndex))
452 sDialog = UCase(sComponents(iCurrentIndex))
453 vCurrentObject = Application.AllDialogs(sDialog)
454 If Not vCurrentObject.IsLoaded Then Goto Trace_Error
455 Set vCurrentObject.UnoDialog = _A2B_.Dialogs.Item(sDialog)
457 If UBound(sComponents)
> 1 Then Goto Trace_Error
458 vCurrentObject = Application.TempVars(sComponents(
1))
461 Case OBJFORM, OBJSUBFORM, OBJCONTROL, OBJDIALOG
462 vCurrentObject = vCurrentObject.Controls(sComponents(iCurrentIndex))
464 If sCurrentProperty
<> "" Then vCurrentObject = PropertiesGet._getProperty(vCurrentObject, sCurrentProperty)
467 Set getObject = vCurrentObject
470 Utils._ResetCalledSub(cstThisSub)
473 TraceError(TRACEFATAL, ERRWRONGARGUMENT, Utils._CalledSub(),
0, , Array(
1, pvShortcut))
476 TraceError(TRACEABORT, Err, cstThisSub, Erl)
478 End Function
' getObject V0.9
.5
480 REM -----------------------------------------------------------------------------------------------------------------------
481 Public Function getObjectType(Optional pvObject As Variant) As String
482 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getObjectType
")
483 getObjectType = PropertiesGet._getProperty(pvObject,
"ObjectType
")
484 End Function
' getObjectType
486 REM -----------------------------------------------------------------------------------------------------------------------
487 Public Function getOpenArgs(Optional pvObject As Variant) As String
488 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getOpenArgs
")
489 getOpenArgs = PropertiesGet._getProperty(pvObject,
"OpenArgs
")
490 End Function
' getOpenArgs
492 REM -----------------------------------------------------------------------------------------------------------------------
493 Public Function getOptionGroup(Optional pvObject As Variant, pvName As variant) As Variant
494 ' Return an OptionGroup object based on its name
496 Utils._SetCalledSub(
"getOptionGroup
")
497 If IsMissing(pvObject) Or IsMissing(pvName) Then Call _TraceArguments()
498 If _ErrorHandler() Then On Local Error Goto Error_Function
500 If Not Utils._CheckArgument(pvObject,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
501 If Not Utils._CheckArgument(pvName,
2, vbString) Then Goto Exit_Function
503 getOptionGroup = pvObject.OptionGroup(pvName)
506 Utils._ResetCalledSub(
"getOptionGroup
")
509 TraceError(TRACEABORT, Err,
"getOptionGroup
", Erl)
511 End Function
' getOptionGroup V0.9
.0
513 REM -----------------------------------------------------------------------------------------------------------------------
514 Public Function getOptionValue(Optional pvObject As Variant) As String
515 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getOptionValue
")
516 getOptionValue = PropertiesGet._getProperty(pvObject,
"OptionValue
")
517 End Function
' getOptionValue
519 REM -----------------------------------------------------------------------------------------------------------------------
520 Public Function getOrderBy(Optional pvObject As Variant) As String
521 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getOrderBy
")
522 getOrderBy = PropertiesGet._getProperty(pvObject,
"OrderBy
")
523 End Function
' getOrderBy
525 REM -----------------------------------------------------------------------------------------------------------------------
526 Public Function getOrderByOn(Optional pvObject As Variant) As Boolean
527 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getOrderByOn
")
528 getOrderByOn = PropertiesGet._getProperty(pvObject,
"OrderByOn
")
529 End Function
' getOrderByOn
531 REM -----------------------------------------------------------------------------------------------------------------------
532 Public Function getPage(Optional pvObject As Variant) As String
533 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getPage
")
534 getPage = PropertiesGet._getProperty(pvObject,
"Page
")
535 End Function
' getPage V0.9
.1
537 REM -----------------------------------------------------------------------------------------------------------------------
538 Public Function getParent(Optional pvObject As Variant) As String
539 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getParent
")
540 getParent = PropertiesGet._getProperty(pvObject,
"Parent
")
541 End Function
' getParent V0.9
.0
543 REM -----------------------------------------------------------------------------------------------------------------------
544 Public Function getProperty(Optional pvItem As Variant, Optional ByVal pvProperty As Variant, ByVal Optional pvIndex As Variant) As Variant
545 ' Return property value of object pvItem, and psProperty property name
546 Utils._SetCalledSub(
"getProperty
")
547 If IsMissing(pvItem) Then Call _TraceArguments()
548 If IsMissing(pvProperty) Then Call _TraceArguments()
549 If IsMissing(pvIndex) Then getProperty = PropertiesGet._getProperty(pvItem, pvProperty) Else getProperty = PropertiesGet._getProperty(pvItem, pvProperty, pvIndex)
550 Utils._ResetCalledSub(
"getProperty
")
551 End Function
' getProperty
553 REM -----------------------------------------------------------------------------------------------------------------------
554 Public Function getRecommendation(Optional pvObject As Variant) As Variant
555 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRecommendation
")
556 getRecommendation = PropertiesGet._getProperty(pvObject,
"Recommendation
")
557 End Function
' getRecommendation
559 REM -----------------------------------------------------------------------------------------------------------------------
560 Public Function getRecordCount(Optional pvObject As Variant) As Variant
561 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRecordCount
")
562 getRecordCount = PropertiesGet._getProperty(pvObject,
"RecordCount
")
563 End Function
' getRecordCount
565 REM -----------------------------------------------------------------------------------------------------------------------
566 Public Function getRecordset(Optional pvObject As Variant) As String
567 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRecordset
")
568 getRecordset = PropertiesGet._getProperty(pvObject,
"Recordset
")
569 End Function
' getRecordset V0.9
.5
571 REM -----------------------------------------------------------------------------------------------------------------------
572 Public Function getRecordSource(Optional pvObject As Variant) As Variant
573 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRecordSource
")
574 getRecordSource = PropertiesGet._getProperty(pvObject,
"RecordSource
")
575 End Function
' getRecordSource
577 REM -----------------------------------------------------------------------------------------------------------------------
578 Public Function getRequired(Optional pvObject As Variant) As Variant
579 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRequired
")
580 getRequired = PropertiesGet._getProperty(pvObject,
"Required
")
581 End Function
' getRequired
583 REM -----------------------------------------------------------------------------------------------------------------------
584 Public Function getRowChangeAction(Optional pvObject As Variant) As Variant
585 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRowChangeAction
")
586 getRowChangeAction = PropertiesGet._getProperty(pvObject,
"RowChangeAction
")
587 End Function
' getRowChangeAction
589 REM -----------------------------------------------------------------------------------------------------------------------
590 Public Function getRowSource(Optional pvObject As Variant) As Variant
591 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRowSource
")
592 getRowSource = PropertiesGet._getProperty(pvObject,
"RowSource
")
593 End Function
' getRowSource
595 REM -----------------------------------------------------------------------------------------------------------------------
596 Public Function getRowSourceType(Optional pvObject As Variant) As Variant
597 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getRowSourceType
")
598 getRowSourceType = PropertiesGet._getProperty(pvObject,
"RowSourceType
")
599 End Function
' getRowSourceType
601 REM -----------------------------------------------------------------------------------------------------------------------
602 Public Function getSelected(Optional pvObject As Variant, ByVal Optional pvIndex As Variant) As Variant
603 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSelected
")
604 If IsMissing(pvIndex) Then
605 getSelected = PropertiesGet._getProperty(pvObject,
"Selected
")
607 getSelected = PropertiesGet._getProperty(pvObject,
"Selected
", pvIndex)
609 End Function
' getSelected
611 REM -----------------------------------------------------------------------------------------------------------------------
612 Public Function getSize(Optional pvObject As Variant) As Variant
613 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSize
")
614 getSize = PropertiesGet._getProperty(pvObject,
"Size
")
615 End Function
' getSize
617 REM -----------------------------------------------------------------------------------------------------------------------
618 Public Function getSource(Optional pvObject As Variant) As String
619 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSource
")
620 getSource = PropertiesGet._getProperty(pvObject,
"Source
")
621 End Function
' getSource V0.9
.0
623 REM -----------------------------------------------------------------------------------------------------------------------
624 Public Function getSourceField(Optional pvObject As Variant) As Variant
625 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSourceField
")
626 getSourceField = PropertiesGet._getProperty(pvObject,
"SourceField
")
627 End Function
' getSourceField
629 REM -----------------------------------------------------------------------------------------------------------------------
630 Public Function getSourceTable(Optional pvObject As Variant) As Variant
631 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSourceTable
")
632 getSourceTable = PropertiesGet._getProperty(pvObject,
"SourceTable
")
633 End Function
' getSourceTable
635 REM -----------------------------------------------------------------------------------------------------------------------
636 Public Function getSpecialEffect(Optional pvObject As Variant) As Variant
637 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSpecialEffect
")
638 getSpecialEffect = PropertiesGet._getProperty(pvObject,
"SpecialEffect
")
639 End Function
' getSpecialEffect
641 REM -----------------------------------------------------------------------------------------------------------------------
642 Public Function getSubType(Optional pvObject As Variant) As Variant
643 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSubType
")
644 getSubType = PropertiesGet._getProperty(pvObject,
"SubType
")
645 End Function
' getSubType
647 REM -----------------------------------------------------------------------------------------------------------------------
648 Public Function getSubComponentName(Optional pvObject As Variant) As Variant
649 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSubComponentName
")
650 getSubComponentName = PropertiesGet._getProperty(pvObject,
"SubComponentName
")
651 End Function
' getSubComponentName
653 REM -----------------------------------------------------------------------------------------------------------------------
654 Public Function getSubComponentType(Optional pvObject As Variant) As Variant
655 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getSubComponentType
")
656 getSubComponentType = PropertiesGet._getProperty(pvObject,
"SubComponentType
")
657 End Function
' getSubComponentType
659 REM -----------------------------------------------------------------------------------------------------------------------
660 Public Function getTabIndex(Optional pvObject As Variant) As Variant
661 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTabIndex
")
662 getTabIndex = PropertiesGet._getProperty(pvObject,
"TabIndex
")
663 End Function
' getTabIndex
665 REM -----------------------------------------------------------------------------------------------------------------------
666 Public Function getTabStop(Optional pvObject As Variant) As Variant
667 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTabStop
")
668 getTabStop = PropertiesGet._getProperty(pvObject,
"TabStop
")
669 End Function
' getTabStop
671 REM -----------------------------------------------------------------------------------------------------------------------
672 Public Function getTag(Optional pvObject As Variant) As Variant
673 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTag
")
674 getTag = PropertiesGet._getProperty(pvObject,
"Tag
")
675 End Function
' getTag
677 REM -----------------------------------------------------------------------------------------------------------------------
678 Public Function getText(Optional pvObject As Variant) As Variant
679 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getText
")
680 getText = PropertiesGet._getProperty(pvObject,
"Text
")
681 End Function
' getText
683 REM -----------------------------------------------------------------------------------------------------------------------
684 Public Function getTextAlign(Optional pvObject As Variant) As Variant
685 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTextAlign
")
686 getTextAlign = PropertiesGet._getProperty(pvObject,
"TextAlign
")
687 End Function
' getTextAlign
689 REM -----------------------------------------------------------------------------------------------------------------------
690 Public Function getTooltipText(Optional pvObject As Variant) As Variant
691 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTooltipText
")
692 getTooltipText = PropertiesGet._getProperty(pvObject,
"TooltipText
")
693 End Function
' getTooltipText
695 REM -----------------------------------------------------------------------------------------------------------------------
696 Public Function getTripleState(Optional pvObject As Variant) As Variant
697 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTripleState
")
698 getTripleState = PropertiesGet._getProperty(pvObject,
"TripleState
")
699 End Function
' getTripleState
701 REM -----------------------------------------------------------------------------------------------------------------------
702 Public Function getTypeName(Optional pvObject As Variant) As Variant
703 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getTypeName
")
704 getTypeName = PropertiesGet._getProperty(pvObject,
"TypeName
")
705 End Function
' getTypeName
707 REM -----------------------------------------------------------------------------------------------------------------------
708 Public Function getValue(Optional pvObject As Variant) As Variant
709 ' getValue also interprets shortcut strings !!
710 Dim vItem As Variant, sProperty As String
711 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getValue
")
712 If VarType(pvObject) = vbString Then
713 Utils._SetCalledSub(
"getValue
")
714 Set vItem = getObject(pvObject)
715 sProperty = Utils._FinalProperty(pvObject)
716 If sProperty =
"" Then sProperty =
"Value
" ' Default value if final property in shortcut is absent
717 getValue = PropertiesGet._getProperty(vItem, sProperty)
718 Utils._ResetCalledSub(
"getValue
")
720 getValue = PropertiesGet._getProperty(pvObject,
"Value
")
722 End Function
' getValue
724 REM -----------------------------------------------------------------------------------------------------------------------
725 Public Function getVisible(Optional pvObject As Variant) As Variant
726 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getVisible
")
727 getVisible = PropertiesGet._getProperty(pvObject,
"Visible
")
728 End Function
' getVisible
730 REM -----------------------------------------------------------------------------------------------------------------------
731 Public Function getWidth(Optional pvObject As Variant) As Long
732 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getWdth
")
733 getWidth = PropertiesGet._getProperty(pvObject,
"Width
")
734 End Function
' getWidth
736 REM -----------------------------------------------------------------------------------------------------------------------
737 Public Function getXPos(Optional pvObject As Variant) As Long
738 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getXPos
")
739 getXPos = PropertiesGet._getProperty(pvObject,
"XPos
")
740 End Function
' getXPos
742 REM -----------------------------------------------------------------------------------------------------------------------
743 Public Function getYPos(Optional pvObject As Variant) As Long
744 If IsMissing(pvObject) Or IsEmpty(pvObject) Then Call _TraceArguments(
"getYPos
")
745 getYPos = PropertiesGet._getProperty(pvObject,
"YPos
")
746 End Function
' getYPos
748 REM -----------------------------------------------------------------------------------------------------------------------
749 REM --- PRIVATE FUNCTIONS ---
750 REM -----------------------------------------------------------------------------------------------------------------------
752 Public Function _getProperty(pvItem As Variant, ByVal psProperty As String, ByVal Optional pvIndex As Variant) As Variant
753 ' Return property value of the psProperty property name within object pvItem
755 If _ErrorHandler() Then On Local Error Goto Error_Function
756 Utils._SetCalledSub(
"get
" & psProperty)
757 _getProperty = Nothing
759 'pvItem must be an object and have the requested property
760 If Not Utils._CheckArgument(pvItem,
1, vbObject) Then Goto Exit_Function
761 If Not PropertiesGet._hasProperty(pvItem._Type, pvItem._PropertiesList(), psProperty) Then Goto Trace_Error
762 'Check Index argument
763 If Not IsMissing(pvIndex) Then
764 If Not Utils._CheckArgument(pvIndex,
3, Utils._AddNumeric()) Then Goto Exit_Function
767 Select Case UCase(psProperty)
768 Case UCase(
"AbsolutePosition
")
769 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
770 _getProperty = pvItem.AbsolutePosition
771 Case UCase(
"AllowAdditions
")
772 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
773 _getProperty = pvItem.AllowAdditions
774 Case UCase(
"AllowDeletions
")
775 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
776 _getProperty = pvItem.AllowDeletions
777 Case UCase(
"AllowEdits
")
778 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
779 _getProperty = pvItem.AllowEdits
780 Case UCase(
"BackColor
")
781 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
782 _getProperty = pvItem.BackColor
783 Case UCase(
"BeginGroup
")
784 If Not Utils._CheckArgument(pvItem,
1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
785 _getProperty = pvItem.BeginGroup
786 Case UCase(
"BOF
")
787 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
788 _getProperty = pvItem.BOF
789 Case UCase(
"Bookmark
")
790 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJRECORDSET)) Then Goto Exit_Function
791 _getProperty = pvItem.Bookmark
792 Case UCase(
"Bookmarkable
")
793 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
794 _getProperty = pvItem.Bookmarkable
795 Case UCase(
"BorderColor
")
796 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
797 _getProperty = pvItem.BorderColor
798 Case UCase(
"BorderStyle
")
799 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
800 _getProperty = pvItem.BorderStyle
801 Case UCase(
"BuiltIn
")
802 If Not Utils._CheckArgument(pvItem,
1, Array(OBJCOMMANDBAR, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
803 _getProperty = pvItem.BuiltIn
804 Case UCase(
"ButtonLeft
")
805 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
806 _getProperty = pvItem.ButtonLeft
807 Case UCase(
"ButtonMiddle
")
808 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
809 _getProperty = pvItem.ButtonMiddle
810 Case UCase(
"ButtonRight
")
811 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
812 _getProperty = pvItem.ButtonRight
813 Case UCase(
"Cancel
")
814 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
815 _getProperty = pvItem.Cancel
816 Case UCase(
"Caption
")
817 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJDIALOG, OBJCONTROL, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
818 _getProperty = pvItem.Caption
819 Case UCase(
"ClickCount
")
820 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
821 _getProperty = pvItem.ClickCount
822 Case UCase(
"ContextShortcut
")
823 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
824 _getProperty = pvItem.ContextShortcut
825 Case UCase(
"ControlSource
")
826 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
827 _getProperty = pvItem.ControlSource
828 Case UCase(
"ControlTipText
")
829 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
830 _getProperty = pvItem.ControlTipText
831 Case UCase(
"ControlType
")
832 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
833 _getProperty = pvItem.ControlType
834 Case UCase(
"Count
")
835 If Not Utils._CheckArgument(pvItem,
1, Array(OBJCOLLECTION,OBJOPTIONGROUP)) Then Goto Exit_Function
836 _getProperty = pvItem.Count
837 Case UCase(
"CurrentRecord
")
838 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
839 _getProperty = pvItem.CurrentRecord
840 Case UCase(
"DataType
")
841 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
842 _getProperty = pvItem.DataType
843 Case UCase(
"DbType
")
844 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
845 _getProperty = pvItem.DbType
846 Case UCase(
"Default
")
847 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
848 _getProperty = pvItem.Default
849 Case UCase(
"DefaultValue
")
850 If Not Utils._CheckArgument(pvItem,
1, Array(OBJCONTROL, OBJFIELD)) Then Goto Exit_Function
851 _getProperty = pvItem.DefaultValue
852 Case UCase(
"Description
")
853 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
854 _getProperty = pvItem.Description
855 Case UCase(
"EditMode
")
856 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
857 _getProperty = pvItem.EditMode
858 Case UCase(
"Enabled
")
859 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
860 _getProperty = pvItem.Enabled
861 Case UCase(
"EOF
")
862 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
863 _getProperty = pvItem.EOF
864 Case UCase(
"EventName
")
865 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
866 _getProperty = pvItem.EventName
867 Case UCase(
"EventType
")
868 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
869 _getProperty = pvItem.EventType
870 Case UCase(
"FieldSize
")
871 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
872 _getProperty = pvItem.FieldSize
873 Case UCase(
"Filter
")
874 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM, OBJRECORDSET)) Then Goto Exit_Function
875 _getProperty = pvItem.Filter
876 Case UCase(
"FilterOn
")
877 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
878 _getProperty = pvItem.FilterOn
879 Case UCase(
"FocusChangeTemporary
")
880 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
881 _getProperty = pvItem.FocusChangeTemporary
882 Case UCase(
"FontBold
")
883 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
884 _getProperty = pvItem.FontBold
885 Case UCase(
"FontItalic
")
886 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
887 _getProperty = pvItem.FontItalic
888 Case UCase(
"FontName
")
889 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
890 _getProperty = pvItem.FontName
891 Case UCase(
"FontSize
")
892 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
893 _getProperty = pvItem.FontSize
894 Case UCase(
"FontUnderline
")
895 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
896 _getProperty = pvItem.FontUnderline
897 Case UCase(
"FontWeight
")
898 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
899 _getProperty = pvItem.FontWeight
900 Case UCase(
"ForeColor
")
901 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
902 _getProperty = pvItem.ForeColor
903 Case UCase(
"Form
")
904 If Not Utils._CheckArgument(pvItem,
1, CTLSUBFORM) Then Goto Exit_Function
905 _getProperty = pvItem.Form
906 Case UCase(
"Format
")
907 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
908 _getProperty = pvItem.Format
909 Case UCase(
"Height
")
910 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function
911 _getProperty = pvItem.Height
912 Case UCase(
"Index
")
913 If Not Utils._CheckArgument(pvItem,
1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
914 _getProperty = pvItem.Index
915 Case UCase(
"IsLoaded
")
916 If Not Utils._CheckArgument(pvItem,
1, OBJFORM) Then Goto Exit_Function
917 _getProperty = pvItem.IsLoaded
918 Case UCase(
"ItemData
")
919 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
920 If IsMissing(pvIndex) Then _getProperty = pvItem.ItemData Else _getProperty = pvItem.ItemData(pvIndex)
921 Case UCase(
"KeyAlt
")
922 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
923 _getProperty = pvItem.KeyAlt
924 Case UCase(
"KeyChar
")
925 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
926 _getProperty = pvItem.KeyChar
927 Case UCase(
"KeyCode
")
928 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
929 _getProperty = pvItem.KeyCode
930 Case UCase(
"KeyCtrl
")
931 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
932 _getProperty = pvItem.KeyCtrl
933 Case UCase(
"KeyFunction
")
934 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
935 _getProperty = pvItem.KeyFunction
936 Case UCase(
"KeyShift
")
937 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
938 _getProperty = pvItem.KeyShift
939 Case UCase(
"LinkChildFields
")
940 If Not Utils._CheckArgument(pvItem,
1, OBJSUBFORM) Then Goto Exit_Function
941 If IsMissing(pvIndex) Then _getProperty = pvItem.LinkChildFields Else _getProperty = pvItem.LinkChildFields(pvIndex)
942 Case UCase(
"LinkMasterFields
")
943 If Not Utils._CheckArgument(pvItem,
1, OBJSUBFORM) Then Goto Exit_Function
944 If IsMissing(pvIndex) Then _getProperty = pvItem.LinkMasterFields Else _getProperty = pvItem.LinkMasterFields(pvIndex)
945 Case UCase(
"ListCount
")
946 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
947 _getProperty = pvItem.ListCount
948 Case UCase(
"ListIndex
")
949 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
950 _getProperty = pvItem.ListIndex
951 Case UCase(
"Locked
")
952 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
953 If IsNull(pvItem.Locked) Then Goto Trace_Error
954 _ge ExitProperty = pvItem.Locked
955 Case UCase(
"MultiSelect
")
956 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
957 _getProperty = pvItem.MultiSelect
958 Case UCase(
"Name
")
959 If Not Utils._CheckArgument(pvItem,
1, _
960 Array(OBJFORM, OBJSUBFORM, OBJCONTROL, OBJOPTIONGROUP, OBJPROPERTY, OBJDIALOG, OBJTABLEDEF, OBJRECORDSET, OBJFIELD, OBJTEMPVAR, OBJCOMMANDBAR) _
961 ) Then Goto Exit_Function
962 _getProperty = pvItem.Name
963 Case UCase(
"ObjectType
")
964 If Not Utils._CheckArgument(pvItem,
1, Array(OBJDATABASE, OBJCOLLECTION, OBJFORM, OBJDIALOG, OBJSUBFORM, OBJCONTROL _
965 , OBJEVENT, OBJOPTIONGROUP, OBJPROPERTY, OBJRECORDSET, OBJTABLEDEF, OBJFIELD, OBJTEMPVAR _
966 , OBJCOMMANDBAR, OBJCOMMANDBARCONTROL) _
967 ) Then Goto Exit_Function
968 _getProperty = pvItem.ObjectType
969 Case UCase(
"OnAction
")
970 If Not Utils._CheckArgument(pvItem,
1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
971 _getProperty = pvItem.OnAction
972 Case UCase(
"OpenArgs
")
973 If Not Utils._CheckArgument(pvItem,
1, OBJFORM) Then Goto Exit_Function
974 _getProperty = pvItem.OpenArgs
975 Case UCase(
"OptionValue
")
976 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
977 _getProperty = pvItem.OptionValue
978 Case UCase(
"OrderBy
")
979 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
980 _getProperty = pvItem.OrderBy
981 Case UCase(
"OrderByOn
")
982 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
983 _getProperty = pvItem.OrderByOn
984 Case UCase(
"Page
")
985 If Not Utils._CheckArgument(pvItem,
1, Array(OBJDIALOG, OBJCONTROL)) Then Goto Exit_Function
986 _getProperty = pvItem.Page
987 Case UCase(
"Parent
")
988 If Not Utils._CheckArgument(pvItem,
1, Array(OBJSUBFORM, OBJCONTROL, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
989 _getProperty = pvItem.Parent
990 Case UCase(
"Recommendation
")
991 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
992 _getProperty = pvItem.Recommendation
993 Case UCase(
"RecordCount
")
994 If Not Utils._CheckArgument(pvItem,
1, OBJRECORDSET) Then Goto Exit_Function
995 _getProperty = pvItem.RecordCount
996 Case UCase(
"Recordset
")
997 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
998 _getProperty = pvItem.Recordset
999 Case UCase(
"RecordSource
")
1000 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
1001 _getProperty = pvItem.RecordSource
1002 Case UCase(
"Required
")
1003 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1004 _getProperty = pvItem.Required
1005 Case UCase(
"RowChangeAction
")
1006 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1007 _getProperty = pvItem.RowChangeAction
1008 Case UCase(
"RowSource
")
1009 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1010 _getProperty = pvItem.RowSource
1011 Case UCase(
"RowSourceType
")
1012 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1013 _getProperty = pvItem.RowSourceType
1014 Case UCase(
"Selected
")
1015 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1016 If IsMissing(pvIndex) Then _getProperty = pvItem.Selected Else _getProperty = pvItem.Selected(pvIndex)
1017 Case UCase(
"Size
")
1018 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
1019 _getProperty = pvItem.Size
1020 Case UCase(
"Source
")
1021 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1022 _getProperty = pvItem.Source
1023 Case UCase(
"SourceTable
")
1024 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
1025 _getProperty = pvItem.SourceTable
1026 Case UCase(
"SourceField
")
1027 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
1028 _getProperty = pvItem.SourceField
1029 Case UCase(
"SpecialEffect
")
1030 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1031 _getProperty = pvItem.SpecialEffect
1032 Case UCase(
"SubComponentName
")
1033 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1034 _getProperty = pvItem.SubComponentName
1035 Case UCase(
"SubComponentType
")
1036 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1037 _getProperty = pvItem.SubComponentType
1038 Case UCase(
"SubType
")
1039 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1040 _getProperty = pvItem.SubType
1041 Case UCase(
"TabIndex
")
1042 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1043 _getProperty = pvItem.TabIndex
1044 Case UCase(
"TabStop
")
1045 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1046 _getProperty = pvItem.TabStop
1047 Case UCase(
"Tag
")
1048 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1049 _getProperty = pvItem.Tag
1050 Case UCase(
"Text
")
1051 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1052 _getProperty = pvItem.Text
1053 Case UCase(
"TextAlign
")
1054 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1055 _getProperty = pvItem.TextAlign
1056 Case UCase(
"TooltipText
")
1057 If Not Utils._CheckArgument(pvItem,
1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
1058 _getProperty = pvItem.TooltipText
1059 Case UCase(
"TripleState
")
1060 If Not Utils._CheckArgument(pvItem,
1, OBJCONTROL) Then Goto Exit_Function
1061 _getProperty = pvItem.TripleState
1062 Case UCase(
"TypeName
")
1063 If Not Utils._CheckArgument(pvItem,
1, OBJFIELD) Then Goto Exit_Function
1064 _getProperty = pvItem.TypeName
1065 Case UCase(
"Value
")
1066 If Not Utils._CheckArgument(pvItem,
1, Array(OBJCONTROL, OBJOPTIONGROUP, OBJPROPERTY, OBJFIELD, OBJTEMPVAR)) Then Goto Exit_Function
1067 _getProperty = pvItem.Value
1068 Case UCase(
"Visible
")
1069 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJDIALOG, OBJCONTROL, OBJCOMMANDBAR, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
1070 _getProperty = pvItem.Visible
1071 Case UCase(
"Width
")
1072 If Not Utils._CheckArgument(pvItem,
1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function
1073 _getProperty = pvItem.Width
1074 Case UCase(
"XPos
")
1075 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1076 If IsNull(pvItem.XPos) Then Goto Trace_Error
1077 _getProperty = pvItem.XPos
1078 Case UCase(
"YPos
")
1079 If Not Utils._CheckArgument(pvItem,
1, OBJEVENT) Then Goto Exit_Function
1080 If IsNull(pvItem.YPos) Then Goto Trace_Error
1081 _getProperty = pvItem.YPos
1087 Utils._ResetCalledSub(
"get
" & psProperty)
1090 TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(),
0,
1, psProperty)
1091 _getProperty = Nothing
1094 TraceError(TRACEFATAL, ERRINDEXVALUE, Utils._CalledSub(),
0,
1, psProperty)
1095 _getProperty = Nothing
1098 TraceError(TRACEABORT, Err,
"_getProperty
", Erl)
1099 _getProperty = Nothing
1101 End Function
' _getProperty V0.9
.1
1103 REM -----------------------------------------------------------------------------------------------------------------------
1104 Public Function _hasProperty(ByVal psObject As String, ByVal pvPropertiesList() As Variant, ByVal pvProperty As Variant) As Boolean
1105 ' Return True if object has a valid property called pvProperty (case-insensitive comparison !)
1106 ' Generic hasProperty function called from all class modules
1108 Dim sObject As String
1109 sObject = Utils._PCase(psObject)
1110 Utils._SetCalledSub(sObject
& ".hasProperty
")
1111 If IsMissing(pvProperty) Then Call _TraceArguments()
1113 _hasProperty = False
1114 If Not Utils._CheckArgument(pvProperty,
1, vbString) Then Goto Exit_Function
1116 _hasProperty = Utils._InList(pvProperty, pvPropertiesList(), , True)
1119 Utils._ResetCalledSub(sObject
& ".hasProperty
")
1121 End Function
' _hasProperty
1123 REM ------------------------------------------------------------------------------------------------------------------------
1124 Public Function _ParentObject(psShortcut As String) As Object
1125 ' Return parent object from shortcut as a string
1127 Dim sParent As String, vParent() As Variant, iBound As Integer
1128 vParent = Split(psShortcut,
"!
")
1129 iBound = UBound(vParent) -
1
1130 ReDim Preserve vParent(
0 To iBound)
' Remove last element
1131 sParent = Join(vParent,
"!
")
1133 'Remove
".Form
" if present
1134 Const cstForm =
".FORM
"
1135 Set _ParentObject = Nothing
1136 If Len(sParent)
> Len(cstForm) Then
1137 If UCase(Right(sParent, Len(cstForm))) = cstForm Then
1138 Set _ParentObject = getValue(sParent)
1140 Set _ParentObject = getObject(sParent)
1144 End Function
' _ParentObject V0.9
.0
1146 REM -----------------------------------------------------------------------------------------------------------------------
1147 Public Function _Properties(ByVal psObject As String _
1148 , ByVal psObjectName As String _
1149 , ByVal pvPropertiesList() As Variant _
1150 , ByVal Optional pvIndex As Variant _
1153 ' a Collection object if pvIndex absent
1154 ' a Property object otherwise
1155 ' Generic function called from Properties methods stored in classes
1157 Dim vProperties As Variant, oCounter As Object, opProperty As Object
1158 Dim iArgNr As Integer, iLen As Integer
1160 Utils._SetCalledSub(psObject
& ".Properties
")
1164 If IsMissing(pvIndex) Then
' Call without index argument prepares a Collection object
1165 Set oCounter = New Collect
1166 oCounter._CollType = COLLPROPERTIES
1167 oCounter._ParentType = UCase(psObject)
1168 oCounter._ParentName = psObjectName
1169 oCounter._Count = UBound(pvPropertiesList) +
1
1170 Set vProperties = oCounter
1172 iLen = Len(psObject) +
1
1173 If Len(_A2B_.CalledSub)
> iLen Then
1174 If Left(_A2B_.CalledSub, iLen) = psObject
& ".
" Then iArgNr =
1 Else iArgNr =
2
1176 If Not Utils._CheckArgument(pvIndex, iArgNr, Utils._AddNumeric()) Then Goto Exit_Function
1177 If pvIndex
< LBound(pvPropertiesList) Or pvIndex
> UBound(pvPropertiesList) Then
1178 TraceError(TRACEFATAL, ERRCOLLECTION, Utils._CalledSub(),
0,
1)
1180 Set opProperty = New Property
1181 opProperty._Name = pvPropertiesList(pvIndex)
1182 opProperty._Value = Null
1183 Set vProperties = opProperty
1188 Set _Properties = vProperties
1189 Utils._ResetCalledSub(psObject
& ".Properties
")
1191 End Function
' _Properties
1193 REM -----------------------------------------------------------------------------------------------------------------------
1194 Public Function _PropertiesList(pvObject As Variant) As Variant
1195 ' Return an array of strings containing the list of valid properties of pvObject
1197 Dim vProperties As Variant
1198 Dim vPropertiesList As Variant, bPropertiesList() As Boolean, sPropertiesList() As String
1199 Dim i As Integer, j As Integer, iCount As Integer
1201 Set vProperties = Nothing
1202 Select Case pvObject._Type
1203 Case OBJCOLLECTION, OBJPROPERTY, OBJFORM, OBJEVENT, OBJSUBFORM, OBJCONTROL, OBJOPTIONGROUP _
1204 , OBJDATABASE, OBJTABLEDEF, OBJQUERYDEF, OBJDIALOG, OBJFIELD, OBJRECORDSET, OBJTEMPVAR _
1205 , OBJCOMMANDBAR, OBJCOMMANDBARCONTROL
1206 vPropertiesList = pvObject._PropertiesList()
1211 Set _PropertiesList = vPropertiesList
1213 End Function
' PropertiesList V0.9
.0