AutoHotkey LV_AddX()


/ Published in: AutoIt
Save to your folder(s)

A workaround to add column data to **ListView** rows from an array or a string with optional delimiter


Copy this code and paste it in your HTML
  1. cols := ""
  2. Loop 1200 ; redraw problems after column 1115
  3. {
  4. cols .= A_Index "|"
  5. }
  6.  
  7. Gui Add, ListView, w1000, %cols%
  8.  
  9. LV_AddX("", "data from list: " cols)
  10. LV_AddX("", ["data from array:", 2, 3])
  11.  
  12. LV_AddX(options, c, delimiter="|")
  13. {
  14. if !IsObject(c) {
  15. StringSplit, c, c, %delimiter%
  16. c := []
  17. Loop %c0%
  18. c.Insert(c%A_Index%)
  19. }
  20. return LV_Add(options, c*)
  21. }
  22.  
  23. Gui Show
  24. LV_ModifyCol()
  25.  
  26.  
  27. ;--------
  28. GuiClose:
  29. Esc::
  30. ExitApp

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.