Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ArrayDisplay
#1
How can I show any type of array (1D or 2D) in QM_Grid?
#2
Function dlg_qmgrid_array
Code:
Copy      Help
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages

if(!ShowDialog("dlg_qmgrid_array" &dlg_qmgrid_array)) ret

;BEGIN DIALOG
;0 "" 0x10C80A44 0x100 0 0 223 135 "Form"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 QM_Grid 0x54000001 0x200 4 4 216 106 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2010800 "" ""

ret
;messages
sel message
,case WM_INITDIALOG
,fill_listview_sample id(3 hDlg)
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_NOTIFY goto messages3
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
;messages3
;NMHDR& nh=+lParam
;sel nh.code
,;case LVN_COLUMNCLICK

Function fill_listview_sample
Code:
Copy      Help
;/
function hlv

TO_LvAddCol hlv 0 "Col1" 70
TO_LvAddCol hlv 1 "Col2" 120
TO_LvAddCol hlv 2 "Col3" 100

ARRAY(str) a
a.create(3 2) ;;3 cols, 2 rows

a[0 0]="1"
a[1 0]="January"
a[2 0]=""

a[0 1]="2"
a[1 1]="February"
a[2 1]="A"

int i
for i 0 a.len(2)
,TO_LvAdd hlv -1 i 0 a[0 i] a[1 i] a[2 i]
#3
Thanks, but I was looking for is to show any type of array (1D or 2D) in QM_Grid

like

Macro
Code:
Copy      Help
ARRAY(str) a
a.ArrayDisplay


Forum Jump:


Users browsing this thread: 1 Guest(s)