Jump to content

IceMaKeR

Members
  • Posts

    2
  • Joined

  • Last visited

IceMaKeR's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hello, Thanks for answering. Yes the treeview creation is missing because i create it from an array dinamically. you can use any data in treeview it causes the error. I think that's my switch is the source of my problem too but can't find where!
  2. Hello all, i need help managing treeview. In my script when i click on an item in my treeview the first click don't do anything. The second one returns the result of the first click, the third returns the second selection and etc... i have seen that the $NM_CLICK execute my function but before the action of selecting my tree object. Can some one explain me the way to make my script run AFTER the selection action? Thanks. Global $TreeList = GUICtrlCreateTreeView(15, 50, 200, 270, $iStyle, $WS_EX_CLIENTEDGE) Global $TreeView = GUICtrlGetHandle($TreeList) GUIRegisterMsg($WM_NOTIFY, '_OnNotify') Func _OnNotify($hWnd, $Msg, $wParam, $lParam) Local $tNMHDR, $hWndFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = DllStructGetData($tNMHDR, "hWndFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $TreeView Switch $iCode Case $NM_CLICK Local $tINFO = DllStructCreate($tagNMTREEVIEW, $lParam) Local $hControl = DllStructGetData($tINFO, "NewhItem") Local $sTVIsSelected =_GUICtrlTreeView_GetText($TreeList, _GUICtrlTreeView_GetSelection($TreeList)) ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sTVIsSelected = ' & $sTVIsSelected & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>_OnNotify
×
×
  • Create New...