Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
defined CSV separator is ignored in displaying data in grid: comma is used instead.
#2
This code works well. How to change it to make it ignore separator ":"?

Function Dialog3
Code:
Copy      Help
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)


Messages In This Thread
RE: defined CSV separator is ignored displaying data in grid: comma is used instead. - by Gintaras - 03-10-2019, 09:27 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)