
This method sets a property to a control.
Returns the following according to the situation:
The recommended convention is passing the control identifier directly:
Copy Code |
|---|
(Odcl_Control_SetProperty MyControlReference [as Reference] PropertyName [as String] PropertyValue [as Any]) |
This variation allows for setting multiple properties at once:
Copy Code |
|---|
(Odcl_Control_SetProperty MyControlReference [as Reference] ( PropertyName1 [as String] PropertyValue1 [as Any] PropertyName2 [as String] PropertyValue2 [as Any] ... ) ) |
An alternative convention is to identify the control by providing the project file, the dialog name and the control name:
Copy Code |
|---|
(Odcl_Control_SetProperty ProjectFile [as String] DialogName [as String] ControlName [as String] PropertyName [as String] PropertyValue [as Any]) |
This variation allows for setting multiple properties at once:
Copy Code |
|---|
(Odcl_Control_SetProperty ProjectFile [as String] DialogName [as String] ControlName [as String] PropertyName [as String] PropertyValue [as Any] ( PropertyName1 [as String] PropertyValue1 [as Any] PropertyName2 [as String] PropertyValue2 [as Any] ... ) ) |
Does not apply to dialogs.
See the property of interest to know what string to pass.
Not all properties can be set.
When setting multiple properties, the process begins from the first to the last. If a problem occur during the processing, the function fails immediately. Any remaining property will not be set and no attempt will be made to set them.
ActiveX, AngleSlider, Animation, BlockList, BlockView, CheckBox, ComboBox, DwgList, DwgPreview, Frame, GraphicButton, EditableGrid, Grid (Hatch), HtmlControl, ImageCombo, Label, ListBox, ListView, MonthPicker, Option, OptionList, PictureBox, ProgressBar, Rectangle, ScrollBar, SliderBar, SlideView, SpinButton, Splitter, TabControl, TextBox, TextButton, TreeControl, UrlLink.
Copy Code |
|---|
; Enable the control (Odcl_Control_SetProperty MyProject_MyForm_MyControl "Enabled" T) ; Make visible and enable the control (Odcl_Control_SetProperty MyProject_MyForm_MyControl (list "Enabled" T "Visible" T)) |