Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Grid image in cell based on path in other cell
#1
If you have the below grid:
Code:
Copy      Help
 c0    c1        c2
img 1|%IMG%|C:\Windows\SysWOW64\@AudioToastIcon.png
img 2|%IMG%|C:\Windows\SysWOW64\@EnrollmentToastIcon.png
img 3|%IMG%|C:\Windows\SysWOW64\@VpnToastIcon.png
img 4|%IMG%|C:\Windows\SysWOW64\@WirelessDisplayToast.png
img 5|%IMG%|C:\Windows\SysWOW64\DefaultAccountTile.png

Is it possible to populate the second column (%IMG%) with the paths from the third cell (cell 2)?
If this would take to much time then skip this, I can only consume that QM3 is an gigantic project which needs all of your attention. But if it is possible to implement an example for the above issue, then that would be very very welcome!

(The image paths used in the above and below code should be existing images available in each windows 10 professional installation)

Function images_in_grid_based_on_path_in_cell
Code:
Copy      Help
str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 224 136 "Dialog"
;3 QM_Grid 0x56031041 0x200 1 2 222 133 "0x0,0,0,0x0,0x0[]Name,20%,7,[]Image,40%,7,[]Path,37%,7,"
;END DIALOG
;DIALOG EDITOR: "" 0x2040601 "*" "" "" ""

str controls = "3"
str qmg3x
if(!ShowDialog(dd &sub.DlgProc &controls)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,DlgGrid- grd.Init(hDlg 3)
,str csv_str=
,;img 1|%IMG%|C:\Windows\SysWOW64\@AudioToastIcon.png
,;img 2|%IMG%|C:\Windows\SysWOW64\@EnrollmentToastIcon.png
,;img 3|%IMG%|C:\Windows\SysWOW64\@VpnToastIcon.png
,;img 4|%IMG%|C:\Windows\SysWOW64\@WirelessDisplayToast.png
,;img 5|%IMG%|C:\Windows\SysWOW64\DefaultAccountTile.png
,ICsv- img_icsv ;; or 'tcsv._create'
,img_icsv=CreateCsv()
,img_icsv.ColumnCount=3
,img_icsv.Separator="|"
,img_icsv.FromString(csv_str)
,grd.FromICsv(img_icsv)
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#2
Much work. Load all images as bitmaps and add to an imagelist. Variable row heights are not supported.
#3
Ok, no problem had a feeling this would be a very time consuming request.
Thanks!


Forum Jump:


Users browsing this thread: 1 Guest(s)