Purpose
Changes properties of existing controls at runtime.
Type: MapBasic Sub
Syntax
AlterControl("Property=""NewValue"" Property=""NewValue"" Property=NewValue""" ...)
The Properties and the available new values depends on the type of Control.
Description
While the application runs the properties of a control sometimes must be changed. This can be a switch from enable to disable, a binding to a specific table or any other available property.
Examples
Declare Method AlterControl Class "GeoAS.RibbonSDK.Addin" Lib "GeoAS.RibbonSDK.dll" Alias AlterControl(byval xml as string)
'******************************
Sub HideOpen
call AlterControl("Name=""HideButton"" Enabled=""False""")
call AlterControl("Name=""DisplayButton"" Enabled=""True""")
call AlterControl("Name=""HomeFileOpenGallerySplitButton"" Visible=""False""")
note "Open-Button hidden"
End Sub
'******************************
Sub DisplayOpen
call AlterControl("Name=""HideButton"" Enabled=""True""")
call AlterControl("Name=""DisplayButton"" Enabled=""False""")
call AlterControl("Name=""HomeFileOpenGallerySplitButton"" Visible=""True""")
note "Open-Button displayed"
End Sub