PropertiesSet.xba 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  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="PropertiesSet" script:language="StarBasic">
  4. REM =======================================================================================================================
  5. REM === The Access2Base library is a part of the LibreOffice project. ===
  6. REM === Full documentation is available on http://www.access2base.com ===
  7. REM =======================================================================================================================
  8. Option Explicit
  9. REM -----------------------------------------------------------------------------------------------------------------------
  10. Public Function setAbsolutePosition(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  11. &apos; Only for open forms
  12. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setAbsolutePosition&quot;)
  13. setAbsolutePosition = PropertiesSet._setProperty(pvObject, &quot;AbsolutePosition&quot;, pvValue)
  14. End Function &apos; setAbsolutePosition
  15. REM -----------------------------------------------------------------------------------------------------------------------
  16. Public Function setAllowAdditions(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  17. &apos; Only for open forms
  18. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setAllowAdditions&quot;)
  19. setAllowAdditions = PropertiesSet._setProperty(pvObject, &quot;AllowAdditions&quot;, pvValue)
  20. End Function &apos; setAllowAdditions
  21. REM -----------------------------------------------------------------------------------------------------------------------
  22. Public Function setAllowDeletions(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  23. &apos; Only for open forms
  24. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setAllowDeletions&quot;)
  25. setAllowDeletions = PropertiesSet._setProperty(pvObject, &quot;AllowDeletions&quot;, pvValue)
  26. End Function &apos; setAllowDeletions
  27. REM -----------------------------------------------------------------------------------------------------------------------
  28. Public Function setAllowEdits(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  29. &apos; Only for open forms
  30. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setAllowEdits&quot;)
  31. setAllowEdits = PropertiesSet._setProperty(pvObject, &quot;AllowEdits&quot;, pvValue)
  32. End Function &apos; setAllowEdits
  33. REM -----------------------------------------------------------------------------------------------------------------------
  34. Public Function setBackColor(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  35. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setBackColor&quot;)
  36. setBackColor = PropertiesSet._setProperty(pvObject, &quot;BackColor&quot;, pvValue)
  37. End Function &apos; setBackColor
  38. REM -----------------------------------------------------------------------------------------------------------------------
  39. Public Function setBookmark(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  40. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setBookmark&quot;)
  41. setBookmark = PropertiesSet._setProperty(pvObject, &quot;Bookmark&quot;, pvValue)
  42. End Function &apos; setBookmark
  43. REM -----------------------------------------------------------------------------------------------------------------------
  44. Public Function setBorderColor (Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  45. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setBorderColor&quot;)
  46. setBorderColor = PropertiesSet._setProperty(pvObject, &quot;BorderColor&quot;, pvValue)
  47. End Function &apos; setBorderColor
  48. REM -----------------------------------------------------------------------------------------------------------------------
  49. Public Function setBorderStyle(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  50. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setBorderStyle&quot;)
  51. setBorderStyle = PropertiesSet._setProperty(pvObject, &quot;BorderStyle&quot;, pvValue)
  52. End Function &apos; setBorderStyle
  53. REM -----------------------------------------------------------------------------------------------------------------------
  54. Public Function setCancel(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  55. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setCancel&quot;)
  56. setCancel = PropertiesSet._setProperty(pvObject, &quot;Cancel&quot;, pvValue)
  57. End Function &apos; setCancel
  58. REM -----------------------------------------------------------------------------------------------------------------------
  59. Public Function setCaption(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  60. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setCaption&quot;)
  61. setCaption = PropertiesSet._setProperty(pvObject, &quot;Caption&quot;, pvValue)
  62. End Function &apos; setCaption
  63. REM -----------------------------------------------------------------------------------------------------------------------
  64. Public Function setControlTipText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  65. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setControlTipText&quot;)
  66. setControlTipText = PropertiesSet._setProperty(pvObject, &quot;ControlTipText&quot;, pvValue)
  67. End Function &apos; setControlTipText
  68. REM -----------------------------------------------------------------------------------------------------------------------
  69. Public Function setCurrentRecord(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  70. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setCurrentRecord&quot;)
  71. setCurrentRecord = PropertiesSet._setProperty(pvObject, &quot;CurrentRecord&quot;, pvValue)
  72. End Function &apos; setCurrentRecord
  73. REM -----------------------------------------------------------------------------------------------------------------------
  74. Public Function setDefault(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  75. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setDefault&quot;)
  76. setDefault = PropertiesSet._setProperty(pvObject, &quot;Default&quot;, pvValue)
  77. End Function &apos; setDefault
  78. REM -----------------------------------------------------------------------------------------------------------------------
  79. Public Function setDefaultValue(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  80. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setDefaultValue&quot;)
  81. setDefaultValue = PropertiesSet._setProperty(pvObject, &quot;DefaultValue&quot;, pvValue)
  82. End Function &apos; setDefaultValue
  83. REM -----------------------------------------------------------------------------------------------------------------------
  84. Public Function setDescription(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  85. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setDescription&quot;)
  86. setDescription = PropertiesSet._setProperty(pvObject, &quot;Description&quot;, pvValue)
  87. End Function &apos; setDescription
  88. REM -----------------------------------------------------------------------------------------------------------------------
  89. Public Function setEnabled(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  90. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setEnabled&quot;)
  91. setEnabled = PropertiesSet._setProperty(pvObject, &quot;Enabled&quot;, pvValue)
  92. End Function &apos; setEnabled
  93. REM -----------------------------------------------------------------------------------------------------------------------
  94. Public Function setFilter(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  95. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFilter&quot;)
  96. setFilter = PropertiesSet._setProperty(pvObject, &quot;Filter&quot;, pvValue)
  97. End Function &apos; setFilter
  98. REM -----------------------------------------------------------------------------------------------------------------------
  99. Public Function setFilterOn(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  100. &apos; Only for open forms
  101. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFilterOn&quot;)
  102. setFilterOn = PropertiesSet._setProperty(pvObject, &quot;FilterOn&quot;, pvValue)
  103. End Function &apos; setFilterOn
  104. REM -----------------------------------------------------------------------------------------------------------------------
  105. Public Function setFontBold(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  106. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontBold&quot;)
  107. setFontBold = PropertiesSet._setProperty(pvObject, &quot;FontBold&quot;, pvValue)
  108. End Function &apos; setFontBold
  109. REM -----------------------------------------------------------------------------------------------------------------------
  110. Public Function setFontItalic(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  111. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontItalic&quot;)
  112. setFontItalic = PropertiesSet._setProperty(pvObject, &quot;FontItalic&quot;, pvValue)
  113. End Function &apos; setFontItalic
  114. REM -----------------------------------------------------------------------------------------------------------------------
  115. Public Function setFontName(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  116. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontName&quot;)
  117. setFontName = PropertiesSet._setProperty(pvObject, &quot;FontName&quot;, pvValue)
  118. End Function &apos; setFontName
  119. REM -----------------------------------------------------------------------------------------------------------------------
  120. Public Function setFontSize(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  121. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontSize&quot;)
  122. setFontSize = PropertiesSet._setProperty(pvObject, &quot;FontSize&quot;, pvValue)
  123. End Function &apos; setFontSize
  124. REM -----------------------------------------------------------------------------------------------------------------------
  125. Public Function setFontUnderline(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  126. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontUnderline&quot;)
  127. setFontUnderline = PropertiesSet._setProperty(pvObject, &quot;FontUnderline&quot;, pvValue)
  128. End Function &apos; setFontUnderline
  129. REM -----------------------------------------------------------------------------------------------------------------------
  130. Public Function setFontWeight(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  131. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setFontWeight&quot;)
  132. setFontWeight = PropertiesSet._setProperty(pvObject, &quot;FontWeight&quot;, pvValue)
  133. End Function &apos; setFontWeight
  134. REM -----------------------------------------------------------------------------------------------------------------------
  135. Public Function setForeColor(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  136. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setForeColor&quot;)
  137. setForeColor = PropertiesSet._setProperty(pvObject, &quot;ForeColor&quot;, pvValue)
  138. End Function &apos; setForeColor
  139. REM -----------------------------------------------------------------------------------------------------------------------
  140. Public Function setHeight(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  141. &apos; Only for open forms
  142. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setHeight&quot;)
  143. setHeight = PropertiesSet._setProperty(pvObject, &quot;Height&quot;, pvValue)
  144. End Function &apos; setHeight
  145. REM -----------------------------------------------------------------------------------------------------------------------
  146. Public Function setListIndex(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  147. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setListIndex&quot;)
  148. setListIndex = PropertiesSet._setProperty(pvObject, &quot;ListIndex&quot;, pvValue)
  149. End Function &apos; setListIndex
  150. REM -----------------------------------------------------------------------------------------------------------------------
  151. Public Function setLocked(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  152. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setLocked&quot;)
  153. setLocked = PropertiesSet._setProperty(pvObject, &quot;Locked&quot;, pvValue)
  154. End Function &apos; setLocked
  155. REM -----------------------------------------------------------------------------------------------------------------------
  156. Public Function setMultiSelect(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  157. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setMultiSelect&quot;)
  158. setMultiSelect = PropertiesSet._setProperty(pvObject, &quot;MultiSelect&quot;, pvValue)
  159. End Function &apos; setMultiSelect
  160. REM -----------------------------------------------------------------------------------------------------------------------
  161. Public Function setOnAction(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  162. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setOnAction&quot;)
  163. setOnAction = PropertiesSet._setProperty(pvObject, &quot;OnAction&quot;, pvValue)
  164. End Function &apos; setOnAction
  165. REM -----------------------------------------------------------------------------------------------------------------------
  166. Public Function setOptionValue(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  167. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setOptionValue&quot;)
  168. setOptionValue = PropertiesSet._setProperty(pvObject, &quot;OptionValue&quot;, pvValue)
  169. End Function &apos; setOptionValue
  170. REM -----------------------------------------------------------------------------------------------------------------------
  171. Public Function setOrderBy(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  172. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setOrderBy&quot;)
  173. setOrderBy = PropertiesSet._setProperty(pvObject, &quot;OrderBy&quot;, pvValue)
  174. End Function &apos; setOrderBy
  175. REM -----------------------------------------------------------------------------------------------------------------------
  176. Public Function setOrderByOn(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  177. &apos; Only for open forms
  178. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setOrderByOn&quot;)
  179. setOrderByOn = PropertiesSet._setProperty(pvObject, &quot;OrderByOn&quot;, pvValue)
  180. End Function &apos; setOrderByOn
  181. REM -----------------------------------------------------------------------------------------------------------------------
  182. Public Function setPage(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  183. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setPage&quot;)
  184. setPage = PropertiesSet._setProperty(pvObject, &quot;Page&quot;, pvValue)
  185. End Function &apos; setPage V0.9.1
  186. REM -----------------------------------------------------------------------------------------------------------------------
  187. Public Function setProperty(Optional pvItem As Variant, ByVal Optional psProperty As String, ByVal Optional pvValue As Variant, ByVal Optional pvIndex As Variant) As Variant
  188. &apos; Return True if property setting OK
  189. Utils._SetCalledSub(&quot;setProperty&quot;)
  190. If IsMissing(pvItem) Or IsMissing(psProperty) Or IsMissing(pvValue) Or IsEmpty(pvItem) Then Call _TraceArguments()
  191. If IsMissing(pvIndex) Then
  192. setProperty = PropertiesSet._setProperty(pvItem, psProperty, pvValue)
  193. Else
  194. setProperty = PropertiesSet._setProperty(pvItem, psProperty, pvValue, pvIndex)
  195. End If
  196. Utils._ResetCalledSub(&quot;setProperty&quot;)
  197. End Function
  198. REM -----------------------------------------------------------------------------------------------------------------------
  199. Public Function setRecordSource(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  200. &apos; Only for open forms
  201. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setRecordSource&quot;)
  202. setRecordSource = PropertiesSet._setProperty(pvObject, &quot;RecordSource&quot;, pvValue)
  203. End Function &apos; setRecordSource
  204. REM -----------------------------------------------------------------------------------------------------------------------
  205. Public Function setRequired(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  206. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setRequired&quot;)
  207. setRequired = PropertiesSet._setProperty(pvObject, &quot;Required&quot;, pvValue)
  208. End Function &apos; setRequired
  209. REM -----------------------------------------------------------------------------------------------------------------------
  210. Public Function setRowSource(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  211. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setRowSource&quot;)
  212. setRowSource = PropertiesSet._setProperty(pvObject, &quot;RowSource&quot;, pvValue)
  213. End Function &apos; setRowSource
  214. REM -----------------------------------------------------------------------------------------------------------------------
  215. Public Function setRowSourceType(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  216. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setRowSourceType&quot;)
  217. setRowSourceType = PropertiesSet._setProperty(pvObject, &quot;RowSourceType&quot;, pvValue)
  218. End Function &apos; setRowSourceType
  219. REM -----------------------------------------------------------------------------------------------------------------------
  220. Public Function setSelected(Optional pvObject As Variant, ByVal Optional pvValue As Variant, ByVal Optional pvIndex As Variant) As Boolean
  221. If IsMissing(pvObject) Or IsMissing(pvValue) Then Call _TraceArguments(&quot;setSelected&quot;)
  222. If IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSelected&quot;)
  223. If IsMissing(pvIndex) Then
  224. setSelected = PropertiesSet._setProperty(pvObject, &quot;Selected&quot;, pvValue)
  225. Else
  226. setSelected = PropertiesSet._setProperty(pvObject, &quot;Selected&quot;, pvValue, pvIndex)
  227. End If
  228. End Function &apos; setSelected
  229. REM -----------------------------------------------------------------------------------------------------------------------
  230. Public Function setSelLength(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  231. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSelLength&quot;)
  232. setSelLength = PropertiesSet._setProperty(pvObject, &quot;SelLength&quot;, pvValue)
  233. End Function &apos; setSelLength
  234. REM -----------------------------------------------------------------------------------------------------------------------
  235. Public Function setSelStart(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  236. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSelStart&quot;)
  237. setSelStart = PropertiesSet._setProperty(pvObject, &quot;SelStart&quot;, pvValue)
  238. End Function &apos; setSelStart
  239. REM -----------------------------------------------------------------------------------------------------------------------
  240. Public Function setSelText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  241. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSelText&quot;)
  242. setSelText = PropertiesSet._setProperty(pvObject, &quot;SelText&quot;, pvValue)
  243. End Function &apos; setSelText
  244. REM -----------------------------------------------------------------------------------------------------------------------
  245. Public Function setSpecialEffect(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  246. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setSpecialEffect&quot;)
  247. setSpecialEffect = PropertiesSet._setProperty(pvObject, &quot;SpecialEffect&quot;, pvValue)
  248. End Function &apos; setSpecialEffect
  249. REM -----------------------------------------------------------------------------------------------------------------------
  250. Public Function setTabIndex(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  251. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTabIndex&quot;)
  252. setTabIndex = PropertiesSet._setProperty(pvObject, &quot;TabIndex&quot;, pvValue)
  253. End Function &apos; setTabIndex
  254. REM -----------------------------------------------------------------------------------------------------------------------
  255. Public Function setTabStop(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  256. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTabStop&quot;)
  257. setTabStop = PropertiesSet._setProperty(pvObject, &quot;TabStop&quot;, pvValue)
  258. End Function &apos; setTabStop
  259. REM -----------------------------------------------------------------------------------------------------------------------
  260. Public Function setTag(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  261. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTag&quot;)
  262. setTag = PropertiesSet._setProperty(pvObject, &quot;Tag&quot;, pvValue)
  263. End Function &apos; setTag
  264. REM -----------------------------------------------------------------------------------------------------------------------
  265. Public Function setTextAlign(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  266. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTextAlign&quot;)
  267. setTextAlign = PropertiesSet._setProperty(pvObject, &quot;TextAlign&quot;, pvValue)
  268. End Function &apos; setTextAlign
  269. REM -----------------------------------------------------------------------------------------------------------------------
  270. Public Function setTooltipText(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  271. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTooltipText&quot;)
  272. setTooltipText = PropertiesSet._setProperty(pvObject, &quot;TooltipText&quot;, pvValue)
  273. End Function &apos; setTooltipText
  274. REM -----------------------------------------------------------------------------------------------------------------------
  275. Public Function setTripleState(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  276. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setTripleState&quot;)
  277. setTripleState = PropertiesSet._setProperty(pvObject, &quot;TripleState&quot;, pvValue)
  278. End Function &apos; setTripleState
  279. REM -----------------------------------------------------------------------------------------------------------------------
  280. Public Function setVisible(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  281. &apos; Only for open forms and controls
  282. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setVisible&quot;)
  283. setVisible = PropertiesSet._setProperty(pvObject, &quot;Visible&quot;, pvValue)
  284. End Function &apos; setVisible
  285. REM -----------------------------------------------------------------------------------------------------------------------
  286. Public Function setWidth(Optional pvObject As Variant, ByVal Optional pvValue As Variant) As Boolean
  287. &apos; Only for open forms
  288. If IsMissing(pvObject) Or IsMissing(pvValue) Or IsEmpty(pvObject) Then Call _TraceArguments(&quot;setWidth&quot;)
  289. setWidth = PropertiesSet._setProperty(pvObject, &quot;Width&quot;, pvValue)
  290. End Function &apos; setWidth
  291. REM -----------------------------------------------------------------------------------------------------------------------
  292. REM --- PRIVATE FUNCTIONS ---
  293. REM -----------------------------------------------------------------------------------------------------------------------
  294. Private Function _CheckProperty(pvObject As Object, ByVal psProperty As String) As Boolean
  295. &apos; Return False if psProperty not within the PropertyValues set of pvItem
  296. Dim i As Integer, oPropertyValues As Variant, oProperty As Variant
  297. oPropertyValues = pvObject.PropertyValues
  298. For i = LBound(oPropertyValues) To UBound(oPropertyValues)
  299. oProperty = oPropertyValues(i)
  300. If UCase(oProperty.Name) = UCase(psProperty) Then
  301. _CheckProperty = True
  302. Exit Function
  303. End If
  304. Next i
  305. _CheckProperty = False
  306. Exit Function
  307. End Function &apos; CheckProperty V0.7.5
  308. REM -----------------------------------------------------------------------------------------------------------------------
  309. Private Function _setProperty(pvItem As Variant, ByVal psProperty As String, ByVal pvValue As Variant, ByVal Optional pvIndex As Variant) As Boolean
  310. &apos; Return True if property setting OK
  311. Utils._SetCalledSub(&quot;set&quot; &amp; psProperty)
  312. If _ErrorHandler() Then On Local Error Goto Error_Function
  313. &apos;pvItem must be an object and have the requested property
  314. If Not Utils._CheckArgument(pvItem, 1, vbObject) Then Goto Exit_Function
  315. &apos;Check Index argument
  316. If Not IsMissing(pvIndex) Then
  317. If Not Utils._CheckArgument(pvIndex, 4, Utils._AddNumeric()) Then Goto Exit_Function
  318. End If
  319. &apos;Execute
  320. Dim iArgNr As Integer, lFormat As Long
  321. Dim i As Integer, iCount As Integer, iSelectedItems() As Integer, bListboxBound As Boolean
  322. Dim odbDatabase As Object, vNames As Variant, bFound As Boolean, sName As String, oModel As Object
  323. Dim ocButton As Variant, iRadioIndex As Integer
  324. _setProperty = True
  325. If _A2B_.CalledSub = &quot;setProperty&quot; Then iArgNr = 3 Else iArgNr = 2
  326. If Not PropertiesGet._hasProperty(pvItem._Type, pvItem._PropertiesList(), psProperty) Then Goto Trace_Error_Control
  327. Select Case UCase(psProperty)
  328. Case UCase(&quot;AbsolutePosition&quot;)
  329. If Not Utils._CheckArgument(pvItem, 1, OBJRECORDSET) Then Goto Exit_Function
  330. pvItem.AbsolutePosition = pvValue
  331. Case UCase(&quot;AllowAdditions&quot;)
  332. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
  333. pvItem.AllowAdditions = pvValue
  334. Case UCase(&quot;AllowDeletions&quot;)
  335. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
  336. pvItem.AllowDeletions = pvValue
  337. Case UCase(&quot;AllowEdits&quot;)
  338. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
  339. pvItem.AllowEdits = pvValue
  340. Case UCase(&quot;BackColor&quot;)
  341. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  342. pvItem.BackColor = pvValue
  343. Case UCase(&quot;Bookmark&quot;)
  344. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJRECORDSET)) Then Goto Exit_Function
  345. pvItem.Bookmark = pvValue
  346. Case UCase(&quot;BorderColor&quot;)
  347. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  348. pvItem.BorderColor = pvValue
  349. Case UCase(&quot;BorderStyle&quot;)
  350. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  351. pvItem.BorderColor = pvValue
  352. Case UCase(&quot;Cancel&quot;)
  353. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  354. pvItem.Cancel = pvValue
  355. Case UCase(&quot;Caption&quot;)
  356. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG, OBJCONTROL)) Then Goto Exit_Function
  357. pvItem.Caption = pvValue
  358. Case UCase(&quot;ControlTipText&quot;)
  359. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  360. pvItem.ControlTipText = pvValue
  361. Case UCase(&quot;CurrentRecord&quot;)
  362. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
  363. pvItem.CurrentRecord = pvValue
  364. Case UCase(&quot;Default&quot;)
  365. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  366. pvItem.Default = pvValue
  367. Case UCase(&quot;DefaultValue&quot;)
  368. If Not Utils._CheckArgument(pvItem, 1, Array(OBJCONTROL, OBJFIELD)) Then Goto Exit_Function
  369. pvItem.DefaultValue = pvValue
  370. Case UCase(&quot;Description&quot;)
  371. If Not Utils._CheckArgument(pvItem, 1, OBJFIELD) Then Goto Exit_Function
  372. pvItem.DefaultValue = pvValue
  373. Case UCase(&quot;Enabled&quot;)
  374. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  375. pvItem.Enabled = pvValue
  376. Case UCase(&quot;Filter&quot;)
  377. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM, OBJRECORDSET)) Then Goto Exit_Function
  378. pvItem.Filter = pvValue
  379. Case UCase(&quot;FilterOn&quot;)
  380. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
  381. pvItem.FilterOn = pvValue
  382. Case UCase(&quot;FontBold&quot;)
  383. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  384. pvItem.FontBold = pvValue
  385. Case UCase(&quot;FontItalic&quot;)
  386. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  387. pvItem.FontItalic = pvValue
  388. Case UCase(&quot;FontName&quot;)
  389. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  390. pvItem.FontName = pvValue
  391. Case UCase(&quot;FontSize&quot;)
  392. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  393. pvItem.FontSize = pvValue
  394. Case UCase(&quot;FontUnderline&quot;)
  395. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  396. pvItem.FontUnderline = pvValue
  397. Case UCase(&quot;FontWeight&quot;)
  398. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  399. pvItem.FontWeight = pvValue
  400. Case UCase(&quot;ForeColor&quot;)
  401. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  402. pvItem.ForeColor = pvValue
  403. Case UCase(&quot;Height&quot;)
  404. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function
  405. pvItem.Height = pvValue
  406. Case UCase(&quot;ListIndex&quot;)
  407. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  408. pvItem.ListIndex = pvValue
  409. Case UCase(&quot;Locked&quot;)
  410. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  411. pvItem.Locked = pvValue
  412. Case UCase(&quot;MultiSelect&quot;)
  413. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  414. pvItem.MultiSelect = pvValue
  415. Case UCase(&quot;OnAction&quot;)
  416. If Not Utils._CheckArgument(pvItem, 1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
  417. pvItem.OnAction = pvValue
  418. Case UCase(&quot;OptionValue&quot;)
  419. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  420. pvItem.OptionValue = pvValue
  421. Case UCase(&quot;OrderBy&quot;)
  422. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
  423. pvItem.OrderBy = pvValue
  424. Case UCase(&quot;OrderByOn&quot;)
  425. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
  426. pvItem.OrderByOn = pvValue
  427. Case UCase(&quot;Page&quot;)
  428. If Not Utils._CheckArgument(pvItem, 1, Array(OBJDIALOG, OBJCONTROL)) Then Goto Exit_Function
  429. pvItem.Page = pvValue
  430. Case UCase(&quot;RecordSource&quot;)
  431. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJSUBFORM)) Then Goto Exit_Function
  432. pvItem.RecordSource = pvValue
  433. Case UCase(&quot;Required&quot;)
  434. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  435. pvItem.Required = pvValue
  436. Case UCase(&quot;RowSource&quot;)
  437. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  438. pvItem.RowSource = pvValue
  439. Case UCase(&quot;RowSourceType&quot;) &apos; Refresh done when RowSource changes, not RowSourceType
  440. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  441. pvItem.RowSourceType = pvValue
  442. Case UCase(&quot;Selected&quot;)
  443. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  444. If IsMissing(pvIndex) Then pvItem.Selected = pvValue Else pvItem.SelectedI(pvValue, pvIndex)
  445. Case UCase(&quot;SelLength&quot;)
  446. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  447. pvItem.SelLength = pvValue
  448. Case UCase(&quot;SelStart&quot;)
  449. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  450. pvItem.SelStart = pvValue
  451. Case UCase(&quot;SelText&quot;)
  452. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  453. pvItem.SelText = pvValue
  454. Case UCase(&quot;SpecialEffect&quot;)
  455. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  456. pvItem.SpecialEffect = pvValue
  457. Case UCase(&quot;TabIndex&quot;)
  458. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  459. pvItem.TabIndex = pvValue
  460. Case UCase(&quot;TabStop&quot;)
  461. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  462. pvItem.TabStop = pvValue
  463. Case UCase(&quot;Tag&quot;)
  464. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  465. pvItem.Tag = pvValue
  466. Case UCase(&quot;TextAlign&quot;)
  467. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  468. pvItem.TextAlign = pvValue
  469. Case UCase(&quot;TooltipText&quot;)
  470. If Not Utils._CheckArgument(pvItem, 1, OBJCOMMANDBARCONTROL) Then Goto Exit_Function
  471. pvItem.TooltipText = pvValue
  472. Case UCase(&quot;TripleState&quot;)
  473. If Not Utils._CheckArgument(pvItem, 1, OBJCONTROL) Then Goto Exit_Function
  474. pvItem.TripleState = pvValue
  475. Case UCase(&quot;Value&quot;)
  476. If Not Utils._CheckArgument(pvItem, 1, Array(OBJCONTROL, OBJOPTIONGROUP, OBJFIELD, OBJTEMPVAR)) Then Goto Exit_Function
  477. pvItem.Value = pvValue
  478. Case UCase(&quot;Visible&quot;)
  479. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG, OBJCONTROL, OBJCOMMANDBAR, OBJCOMMANDBARCONTROL)) Then Goto Exit_Function
  480. pvItem.Visible = pvValue
  481. Case UCase(&quot;Width&quot;)
  482. If Not Utils._CheckArgument(pvItem, 1, Array(OBJFORM, OBJDIALOG)) Then Goto Exit_Function
  483. pvItem.Width = pvValue
  484. Case Else
  485. Goto Trace_Error_Control
  486. End Select
  487. Exit_Function:
  488. Utils._ResetCalledSub(&quot;set&quot; &amp; psProperty)
  489. Exit Function
  490. Trace_Error_Form:
  491. TraceError(TRACEFATAL, ERRFORMNOTFOUND, Utils._CalledSub(), 0, 1, pvItem._Name)
  492. _setProperty = False
  493. Goto Exit_Function
  494. Trace_Error_Control:
  495. TraceError(TRACEFATAL, ERRPROPERTY, Utils._CalledSub(), 0, 1, psProperty)
  496. _setProperty = False
  497. Goto Exit_Function
  498. Trace_Error_Value:
  499. TraceError(TRACEFATAL, ERRPROPERTYVALUE, Utils._CalledSub(), 0, 1, Array(pvValue, psProperty))
  500. _setProperty = False
  501. Goto Exit_Function
  502. Trace_Error_Index:
  503. TraceError(TRACEFATAL, ERRINDEXVALUE, Utils._CalledSub(), 0, 1, psProperty)
  504. _setProperty = Nothing
  505. Goto Exit_Function
  506. Trace_Error_Array:
  507. TraceError(TRACEFATAL, ERRPROPERTYNOTARRAY, Utils._CalledSub(), 0, 1, iArgNr)
  508. _setProperty = Nothing
  509. Goto Exit_Function
  510. Error_Function:
  511. TraceError(TRACEABORT, Err, &quot;_setProperty&quot;, Erl)
  512. GoTo Exit_Function
  513. End Function &apos; _setProperty V0.9.1
  514. </script:module>