03-10-2019, 09:27 AM
This code works well. How to change it to make it ignore separator ":"?
Function Dialog3
Function Dialog3
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog" "4"
;3 QM_Grid 0x56031041 0x200 8 8 208 50 "0x3,0,0,0x0,0x0[]A,,,[]B,,,"
;4 QM_Grid 0x56031041 0x200 8 64 208 50 "0x3,0,0,0x0,0x0[]A,,,[]B,,,"
;1 Button 0x54030001 0x4 116 116 48 14 "OK"
;2 Button 0x54030000 0x4 168 116 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040800 "*" "" "" ""
str controls = "3 4"
str qmg3x qmg4x
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
#sub DlgProc
function# hDlg message wParam lParam
sel message
,case WM_INITDIALOG
,goto gInit
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
;gInit
str txCsv=
;aaa, bbb: ccc
;ddd, eee: fff
DlgGrid g1.Init(id(3 hDlg))
g1.FromCsv(txCsv ":")
DlgGrid g2.Init(id(4 hDlg))
ICsv txTable._create; txTable.Separator=":"; txTable.FromString(txCsv)
g2.FromICsv(txTable)