Difference between revisions of "Talk:CudaText API"

From Lazarus wiki
Jump to navigationJump to search
Line 4: Line 4:
 
  dlg_adv(title, text)
 
  dlg_adv(title, text)
  
Shows dialog with several controls. Controls allowed: checkbox, editbox, combobox, splitter-line.
+
Shows dialog with several controls. Controls allowed:  
 +
 
 +
* checkbox
 +
* editbox
 +
* combobox
 +
* splitter-line
  
 
Param text is "\n"-separated items, one item per control. Each item is chr(1)-separated subitems. Each subitem is "\t"-separated, s_name+"\t"+s_value. Possible names (and names' values):
 
Param text is "\n"-separated items, one item per control. Each item is chr(1)-separated subitems. Each subitem is "\t"-separated, s_name+"\t"+s_value. Possible names (and names' values):
  
* "type": type of control, values: "check", "edit", "combo", "splitter".
+
* "type": type of control, values: "check", "edit", "combo", "splitter"
 +
* "pos": position of control, ","-separated values: left, top, right, bottom (e.g. "10,10,300,20")
 
* "cap": caption of control
 
* "cap": caption of control
 
* "items":
 
* "items":
Line 14: Line 20:
 
* "val": value of control:
 
* "val": value of control:
 
** for check: "0"/"1" for off/on
 
** for check: "0"/"1" for off/on
** for edit: it's text  
+
** for edit: its text  
** for combo: index of selected item as str(index)
+
** for combo: index of selected item (converted to str)
  
 
Gets "\n"-separated items, each item is value of control.
 
Gets "\n"-separated items, each item is value of control.

Revision as of 15:06, 12 December 2015

Proposed

dlg_adv(title, text)

Shows dialog with several controls. Controls allowed:

  • checkbox
  • editbox
  • combobox
  • splitter-line

Param text is "\n"-separated items, one item per control. Each item is chr(1)-separated subitems. Each subitem is "\t"-separated, s_name+"\t"+s_value. Possible names (and names' values):

  • "type": type of control, values: "check", "edit", "combo", "splitter"
  • "pos": position of control, ","-separated values: left, top, right, bottom (e.g. "10,10,300,20")
  • "cap": caption of control
  • "items":
    • for combo: "\t"-separated items
  • "val": value of control:
    • for check: "0"/"1" for off/on
    • for edit: its text
    • for combo: index of selected item (converted to str)

Gets "\n"-separated items, each item is value of control. Gets None if cancelled.

Alextp