EKY32 Posted October 8, 2012 Posted October 8, 2012 (edited) I have a list view with long items' labels and I need to view a tool tip showing the full item label when the mouse cursor is over the Explorer-Styled item: Any help please? expandcollapse popup#include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("Form1", 275, 243, 192, 124) $ListView1 = GUICtrlCreateListView("one|two", 8, 8, 257, 225) _SetWindowTheme(GUICtrlGetHandle(-1), "Explorer") GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 50) GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 50) $ListView1_0 = GUICtrlCreateListViewItem("item 1|item1-1", $ListView1) $ListView1_1 = GUICtrlCreateListViewItem("item2|item2-2", $ListView1) $ListView1_2 = GUICtrlCreateListViewItem("item item item 3|item item item 3-3", $ListView1) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func _SetWindowTheme($hWnd, $sName = 0, $sList = 0) Local $TypeOfName = 'wstr', $TypeOfList = 'wstr' If Not IsString($sName) Then $TypeOfName = 'ptr' $sName = 0 EndIf If Not IsString($sList) Then $TypeOfList = 'ptr' $sList = 0 EndIf Local $Ret = DllCall('uxtheme.dll', 'uint', 'SetWindowTheme', 'hwnd', $hWnd, $TypeOfName, $sName, $TypeOfList, $sList) If @error Then Return SetError(1, 0, 0) Else If $Ret[0] Then Return SetError(1, $Ret[0], 0) EndIf EndIf Return 1 EndFunc ;==>CtrlSetTheme Thank you. Edited October 8, 2012 by EKY32 [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
JohnOne Posted October 8, 2012 Posted October 8, 2012 guictrlsettip() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
EKY32 Posted October 8, 2012 Author Posted October 8, 2012 Thank you Mr.AZJIO it worked fine.Thank you all. [font="'trebuchet ms', helvetica, sans-serif;"]Please mark the answer of your question if you found it.[/font]
Skitty Posted October 8, 2012 Posted October 8, 2012 I have an application that has a lot more information in some sub-items of the list view.Even "$LVS_EX_INFOTIP" didn't cut it for me since it doesn't include line breaks or doesn't wrap.What I've had to do was catch a few Widows Messages and display a custom infotip for them thatwill wrap the string and include line breaks. I still don't like this method since it's pretty tricky to remove the current infotip when the mouse leaves the gui, I can't figure out how to do it without using a mouse hookor windows hook, which I'd like to avoid... And adlib doesn't work either since the app is pretty busy doing things at times, which is why I'd like to solvethis using a windows message method. Still trying it though, and if I have something, I'll post it here. One of the problems is that the windowsmessages like mouse events don't work with the listview.
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