Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
If the grid has more than two. Instruction method
#1
Hello. Big Grin
Thank you, who always helping.
Please help me to.

If the grid has more than two.
It wants to transfer an instruction to separate the grid A and B.
How can i do?

Function test
Code:
Copy      Help
;messages3
NMHDR* nh=+lParam
sel nh.idFrom
,case 29
,GRID.QM_NMLVDATA* cd=+nh
,,NMLVDISPINFO* di=+nh
,,NMLISTVIEW* nlv=+nh
,case 34
,GRID.QM_NMLVDATA* cdd=+nh
,,NMLVDISPINFO* dii=+nh
,,NMLISTVIEW* nlvv=+nh

sel nh.code
,case NM_CLICK ;;when user clicks a row and it does not begin cell edit mode
,,NMITEMACTIVATE* na=+nh
,,;out "row click: %i %i" na.iItem na.iSubItem

,,if na.iSubItem=7;; URL
,,,str GetUrl=g.CellGet(na.iItem 7)
,,,,GetUrl.setwintext(id(24 hDlg))

,,,SHDocVw.IWebBrowser2 urlAddress=web(GetUrl MakeInt(1 5));err


,case NM_DBLCLK ;;when user double clicks a row and it does not begin cell edit mode
,,NMITEMACTIVATE* naa=+nh
,,;out "row click: %i %i" naa.iItem naa.iSubItem

,case LVN_BEGINLABELEDIT
,,;out "begin edit: item=%i subitem=%i text=%s" di.item.iItem di.item.iSubItem di.item.pszText
;
,case GRID.LVN_QG_BUTTONCLICK:
,,;out "button2: item=%i subitem=%i text=%s" cd.item cd.subitem cd.txt

,case LVN_COLUMNCLICK ;;click header
,,g.Sort(4|0x10000 nlv.iSubItem);;In normal operation
,,s.Sort(4|0x10000 nlvv.iSubItem);;Error occurs
#2
Macro Macro2616
Code:
Copy      Help
;messages3
NMHDR* nh=+lParam
sel nh.idFrom
,case 29 ret sub.GridNotifyA(nh)
,case 34 ret sub.GridNotifyB(nh)


#sub GridNotifyA
function NMHDR*nh
GRID.QM_NMLVDATA* cd=+nh
NMLVDISPINFO* di=+nh
NMLISTVIEW* nlv=+nh
sel nh.code
,case NM_CLICK
,;...


#sub GridNotifyB
function NMHDR*nh
GRID.QM_NMLVDATA* cd=+nh
NMLVDISPINFO* di=+nh
NMLISTVIEW* nlv=+nh
sel nh.code
,case NM_CLICK
,;...
#3
I understand.
Thankyou for Gintaras. Big Grin
Have a good day!.


Forum Jump:


Users browsing this thread: 1 Guest(s)