Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some operations of QM_Grid control
#3
Now there is only one last problem that has not been solved. There is a function I need in the find and replacement panel of QM (as shown in the figure below). Where can I find the code of this function?
[Image: 1677827049]

Bug4: Match case does not work
Resolved!

Code:
Copy      Help
,case EN_CHANGE<<16|14 ;;Replace
,str fi.getwintext(id(13 hDlg))
,str re.getwintext(id(14 hDlg))
,Pre.getwintext(id(4 hDlg))
,Suf.getwintext(id(5 hDlg))
,Ex.getwintext(id(16 hDlg))
,for _i 0 g.RowsCountGet
,,_s=g.CellGet(_i 0)
,,fn.getfilename(_s)
,,if(empty(Ex)) Ex.GetFilenameExt(_s)
,,_s.from(Pre fn Suf "." Ex)
,,
,,if(but(id(17 hDlg))) _s.findreplace(fi re)
,,else _s.findreplace(fi re 1)
,,g.CellSet(_i 1 _s)

Add: Support regular expressions

There is only the last question. I don't understand regular expressions

It seems that the problem has been solved, but it may not be complete Smile


Code:
Copy      Help
,case EN_CHANGE<<16|14 ;;Replace
,str fi.getwintext(id(13 hDlg))
,str re.getwintext(id(14 hDlg))
,Pre.getwintext(id(4 hDlg))
,Suf.getwintext(id(5 hDlg))
,Ex.getwintext(id(16 hDlg))
,for _i 0 g.RowsCountGet
,,_s=g.CellGet(_i 0)
,,fn.getfilename(_s)
,,if(empty(Ex)) Ex.GetFilenameExt(_s)
,,_s.from(Pre fn Suf "." Ex)
,,
,,if(but(id(10 hDlg)) and but(id(17 hDlg)))
,,,_s.replacerx(fi re)
,,
,,if(but(id(10 hDlg)) and !but(id(17 hDlg)))
,,,_s.replacerx(fi re 1)
,,,
,,if(but(id(17 hDlg)) and !but(id(10 hDlg)))
,,,_s.findreplace(fi re)
,,else
,,,_s.findreplace(fi re 1)
,,g.CellSet(_i 1 _s)

The text in the rule needs to be escaped. If someone can improve it, thank you in advance


Messages In This Thread
Some operations of QM_Grid control - by Davider - 02-28-2023, 01:59 AM
RE: Some operations of QM_Grid control - by Davider - 02-28-2023, 07:06 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)