Difference between revisions of "$did"

From Scriptwiki
Jump to: navigation, search
m (added note that $did without param's returns the ID)
m (fixed up, looks sharp)
Line 1: Line 1:
== $did ==
+
Returns the settings and values of controls in a [[Dialog basics|dialog]].
 
+
$did(name,id)
You can get the settings and values of controls in a dialog by using the $did() dialog id identifier with the following formats and properties as appropriate to the control to which you are referring.<br>
+
$did(name,id,N)
$did without parameters returns the ID of triggering control<br>
+
If used in the [[on dialog]] event, name is optional.
$did(name,id)<br>
 
$did(name,id,N)<br>
 
If used in the on dialog event, name is optional.
 
  
 
The following $did() properties are supported:
 
The following $did() properties are supported:
  
  text returns line or Nth line '''$did(id) is same as $did(id).text'''
+
  text returns line or Nth line
 +
      $did(id) is same as $did(id).text
 
  len returns length of line or length of Nth line
 
  len returns length of line or length of Nth line
 
  lines returns number of lines
 
  lines returns number of lines
  sel returns Line Number of Nth selected line if N is 0, returns number of selected lines
+
  sel returns Line Number of Nth selected line
 +
      if N is 0, returns number of selected lines
 
  seltext returns selected text in an editbox or first selected item in a listbox
 
  seltext returns selected text in an editbox or first selected item in a listbox
 
  selstart returns select start character in editbox line
 
  selstart returns select start character in editbox line
Line 23: Line 22:
 
  enabled returns $true if the control is enabled, otherwise $false
 
  enabled returns $true if the control is enabled, otherwise $false
 
  isid returns $true if id exists in the dialog, otherwise $false
 
  isid returns $true if id exists in the dialog, otherwise $false
  csel returns line number of Nth checked box in a listcb control if N is 0, returns number of checked lines
+
  csel returns line number of Nth checked box in a listcb control
 +
      if N is 0, returns number of checked lines
 
  cstate returns 0 = off, 1 = on for item in a listcb control
 
  cstate returns 0 = off, 1 = on for item in a listcb control
  
 
You can access the edit control in a combobox by using 0 as the N value.
 
You can access the edit control in a combobox by using 0 as the N value.
 +
 +
== See Also ==
 +
 +
* [[$didwm]]
 +
* [[$didreg]]
 +
* [[$didtok]]
 +
* [[didtok|/didtok]]
 +
* [[did|/did]]
  
 
[[Category:Dialogs]]
 
[[Category:Dialogs]]
 
[[Category:Dialog Identifiers]]
 
[[Category:Dialog Identifiers]]

Revision as of 21:09, 8 April 2008

Returns the settings and values of controls in a dialog.

$did(name,id)
$did(name,id,N)

If used in the on dialog event, name is optional.

The following $did() properties are supported:

text	 returns line or Nth line
      $did(id) is same as $did(id).text
len	 returns length of line or length of Nth line
lines	 returns number of lines
sel	 returns Line Number of Nth selected line
      if  N is 0, returns number of selected lines
seltext	 returns selected text in an editbox or first selected item in a listbox
selstart returns select start character in editbox line
selend	 returns select end character in editbox line
edited	 returns $true if text in editbox was changed
state	 returns 0 = off, 1 = on, and 2 = indeterminate
next	 returns id of next control in tab key order
prev	 returns id of previous control in tab key order
visible	 returns $true if the control is visible, otherwise $false
enabled	 returns $true if the control is enabled, otherwise $false
isid	 returns $true if id exists in the dialog, otherwise $false
csel	 returns line number of Nth checked box in a listcb control
      if N is 0, returns number of checked lines
cstate	 returns 0 = off, 1 = on for item in a listcb control

You can access the edit control in a combobox by using 0 as the N value.

See Also