Difference between revisions of "$did"

From Scriptwiki
Jump to: navigation, search
m
 
m (Added doc for $did with no parameters (ID))
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== $did ==
+
Returns the settings and values of controls in a [[Dialog basics|dialog]], or the id of the object an event was performed on in an [[On dialog]] event.
 +
$did
 +
* Returns the ID of the object of a [[Dialog basics|dialog]] event.
 +
$did(name,id)
 +
$did(name,id,N)
 +
 
 +
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 ==
 +
 
 +
* [[$didwm]]
 +
* [[$didreg]]
 +
* [[$didtok]]
 +
* [[didtok|/didtok]]
 +
* [[did|/did]]
  
 
[[Category:Dialogs]]
 
[[Category:Dialogs]]
 +
[[Category:Dialog Identifiers]]

Latest revision as of 19:09, 10 May 2008

Returns the settings and values of controls in a dialog, or the id of the object an event was performed on in an On dialog event.

$did
  • Returns the ID of the object of a dialog event.
$did(name,id)
$did(name,id,N)

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