You must remember that MapBasic is procedural, not Object Orientated !! You
can, however,give each control an handler so that it can do something when it
changes. See below for an example.
cheers,
William.
William Forde.
Arthur Andersen
Petroleum Services Group
London, UK
'=================================
' Defines to make things clearer..
define lb_listbox 1000
define cb_checkbox 1001
Sub My Dialog
Dialog
Title "My Dialog"
Width ...
Height ...
Control StaticText
Position ...
Width ...
Height ...
Title "Table Names:"
Id -1
Enable
'This is the one which will have an handler
Control ListBox
Position...
Width ...
Height ...
Title from variable gstTables
'Calling <xyz> specifies the routine to call
Calling MyDialog_ListBoxHandler
ID lb_listbox
Enable
'This control couild have an handler too, if you wanted.
Control CheckBox
Position ...
Width ...
Height ...
Title "Display this layer"
Value mbDisplayThisLayer
Into mbDisplayThisLayer
ID cb_checkbox
Enable
'Validate the dialog data ....
If CommandInfo(CMD_INFO_DLG_OK) then
'OK has been pressed, do something
Else
'Cancel has been pressed, quit
End If
End Sub
' This is the handler for the list box
Sub MyDialog_ListBoxHandler
If <insert condition here> then
' here I am enabling the checkbox - you could do almost anything you
like though...
Alter Control cd_checkbox enable
Else
Alter Control cd_checkbox disable
End If
End Sub
*******************Internet Email Confidentiality Footer*******************
Privileged/Confidential Information may be contained in this message. If you
are not the addressee indicated in this message (or responsible for delivery of
the message to such person), you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender by
reply email. Please advise immediately if you or your employer does not consent
to Internet email for messages of this kind. Opinions, conclusions and other
information in this message that do not relate to the official business of my
firm shall be understood as neither given nor endorsed by it.
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]