Tam0r Posted July 28, 2007 Share Posted July 28, 2007 Is it possible into a Listview column to indicate a Combobox? as e.g. with Koda Link to comment Share on other sites More sharing options...
martin Posted July 29, 2007 Share Posted July 29, 2007 Is it possible into a Listview column to indicate a Combobox? as e.g. with Koda You could place a combobox over a listview. Here is an example but it doesn't look too good. expandcollapse popup#include <GUIConstants.au3> #include <guilistview.au3> #include <constants.au3> Global Const $WM_COMMAND = 0x0111 Global Const $CBN_DROPDOWN = 7 Global Const $CBN_CLOSEUP = 8 #Region ### START Koda GUI section ### Form= $Form2 = GUICreate("Form2", 413, 298, 208, 142) $LV = GUICtrlCreateListView("title", 8, 24, 160, 150) GUICtrlSendMsg(-1, 0x101E, 0, 100) $ListView1_0 = GUICtrlCreateListViewItem("B5:AB :8@8;;8FK", $LV) $ListView1_1 = GUICtrlCreateListViewItem("bbbbbbbbbbbb", $LV) $ListView1_2 = GUICtrlCreateListViewItem("B5AB", $LV) $ListView1_3 = GUICtrlCreateListViewItem("dddddddddd", $LV) $ListView1_4 = GUICtrlCreateListViewItem("eeeeeeeeeeeeee", $LV) $ListView1_5 = GUICtrlCreateListViewItem("ffffffffffffff", $LV) $ListView1_6 = GUICtrlCreateListViewItem("gggggggggggggg", $LV) $Combo1 = GUICtrlCreateCombo("Combo1", 168, 152, 100, 25, BitOR($CBS_DROPDOWN,$CBS_AUTOHSCROLL,$WS_CLIPSIBLINGS)) GUICtrlSetData(-1,"one|two|three|four") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### GUICtrlSetState($combo1,$GUI_ONTOP) GUICtrlSetState($combo1,$GUI_HIDE) GUIRegisterMsg($WM_COMMAND,"MY_WM_COMMAND") Global $lvit $LVItHt = 14 $LVPos = ControlGetPos("Form2","",$LV) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $GUI_EVENT_PRIMARYDOWN ;get info on control the mouse is over $Info = GUIGetCursorInfo (WinGetHandle($Form2)) If $Info[4] = $LV Then ;if over the Listview setcombo() ;get the text of the selected item EndIf EndSwitch WEnd Func setcombo() $lvit = _GUICtrlListViewGetCurSel($lv) ConsoleWrite("row = " & $lvit & @CRLF) GUICtrlSetPos($combo1,$LVPos[0] + 4,$LVPos[1] + $lvit*$LVItHt + 20) GUICtrlSetState($combo1,BitOR($GUI_ONTOP,$GUI_SHOW)) DllCall("user32.dll", "int", "InvalidateRect", "hwnd", GUICtrlGetHandle($Combo1), "int", 0, "int", 1) EndFunc Func MY_WM_COMMAND($hWnd, $msg, $wParam, $lParam) Local $nNotifyCode = _HiWord($wParam) Local $nID = _LoWord($wParam) Local $hCtrl = $lParam Switch $nID Case $combo1 Switch $nNotifyCode Case $CBN_CLOSEUP _GUICtrlListViewSetItemText($lv,$lvit,0,GUICtrlRead($combo1)) GUICtrlSetState($combo1,$GUI_HIDE) EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;MY_WM_COMMAND Func _HiWord($x) Return BitShift($x, 16) EndFunc ;==>_HiWord Func _LoWord($x) Return BitAND($x, 0xFFFF) EndFunc ;==>_LoWord Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
Tam0r Posted July 29, 2007 Author Share Posted July 29, 2007 Thanks. It does not function however correctly au3Lib has that with ListBox LBS_COMBOBOX as goes? Link to comment Share on other sites More sharing options...
GaryFrost Posted July 29, 2007 Share Posted July 29, 2007 Thanks. It does not function however correctlyau3Lib has that with ListBox LBS_COMBOBOX as goes?Quote from MSDNLBS_COMBOBOX Notifies a list box that it is part of a combo box. This allows coordination between the two controls so that they present a unified user interface (UI). The combo box itself must set this style. If the style is set by anything but the combo box, the list box will regard itself incorrectly as a child of a combo box and a failure will result. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Tam0r Posted July 30, 2007 Author Share Posted July 30, 2007 (edited) Quote from MSDNThxI can solve the problem only in such a way. Point someone a possibility over option better to represent?33 x Edit Edited July 30, 2007 by Tam0r Link to comment Share on other sites More sharing options...
randallc Posted July 30, 2007 Share Posted July 30, 2007 (edited) Hi,cf part solution?; does this apply from eltorro?http://www.autoitscript.com/forum/index.ph...st&p=355879Listview And Combobox Within,Edit In Place ListviewBest, Randall Edited July 30, 2007 by randallc ExcelCOM... AccessCom.. Word2... FileListToArrayNew...SearchMiner... Regexps...SQL...Explorer...Array2D.. _GUIListView...array problem...APITailRW Link to comment Share on other sites More sharing options...
Tam0r Posted July 31, 2007 Author Share Posted July 31, 2007 Thanks is however not yet well solved. That became those user with the time nerves.Hi,cf part solution?; does this apply from eltorro?http://www.autoitscript.com/forum/index.ph...st&p=355879Listview And Combobox Within,Edit In Place ListviewBest, Randall Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now