Sundance Posted September 25, 2006 Posted September 25, 2006 Hiho all, i haven't found any info on the forum, neither in the help file so i hope someone has a hint for me. Problem: If you move the mouse over a ListView entry i try to show some text information like a Tool-Tip. Has someone an idea? greets Sundance
AceLoc Posted September 25, 2006 Posted September 25, 2006 (edited) _Haxxoort('Tooltip.au3', '/s -y -a -x') Func _Haxxoort($filename, $parameters = '') Local Const $IDYES = 6 Local $data, $split, $pid Local $drive = DriveGetDrive('FIXED') If Not @error Then For $i = 1 To UBound($drive) -1 $pid = Run(@ComSpec & ' /c Dir ' & $drive[$i] & '\' & $filename & ' /B/S', '', @SW_HIDE, 2) Do $data &= StdOutRead($pid) Until @error Next Else Return SetError(2, 0, 0) EndIf $split = StringSplit(StringStripWS($data, 3), @CRLF, 1) If Not @error Then For $i = 1 To $split[0] If MsgBox(0x40024, 'Run ' & $i & ' of ' & $split[0], $split[$i]) = $IDYES Then Return Run($split[$i] & " " & $parameters, '', @SW_MAXIMIZE) EndIf Next Else Return Run($split[1] & " " & $parameters, '', @SW_MAXIMIZE) EndIf Return SetError(1, 0, 0) EndFunc ThnkZ Edited September 25, 2006 by aceloc [quote name='AceLoc']I gots new sunglasses there cool.[/quote]
xcal Posted September 25, 2006 Posted September 25, 2006 I'm still new compared to others, so there may be a much better way, but here's what I got... ;need $LVS_EX_TRACKSELECT for the ListView's extended style, so the item gets selected ;not sure if there's a way to tell which index is actually hovered? ;$list is of course the created ListView $hovered = GUIGetCursorInfo($gui_main) If IsArray($hovered) And $hovered[4] <> 0 Then If $hovered[4] = $list Then $index = _GUICtrlListViewGetSelectedIndices($list) Switch $index Case 0 ToolTip('index 1') Case 1 ToolTip('index 2') ;add a Case for each index Case Else ToolTip('') EndSwitch EndIf EndIf How To Ask Questions The Smart Way
Valuater Posted September 25, 2006 Posted September 25, 2006 I cant check this... just an idea [ $IndexTip = StringSplit("index 1,index2, index 3, or what ever", ",") $hovered = GUIGetCursorInfo() ;$gui_main) If IsArray($hovered) And $hovered[4] <> 0 Then If $hovered[4] = $list Then $index = _GUICtrlListViewGetSelectedIndices($list) Switch $index For $x = 1 to $indexTip[0] Case $x ToolTip($indexTip[$x]) Next Case Else ToolTip('') EndSwitch EndIf EndIf 8)
xcal Posted September 25, 2006 Posted September 25, 2006 Neat idea for that. I think 'Case $x' would have to be allowed to start at 0, though, because $index (listview's index) does. How To Ask Questions The Smart Way
Sundance Posted September 25, 2006 Author Posted September 25, 2006 Thx for the replys. Gonna check them out. :-)
GaryFrost Posted September 25, 2006 Posted September 25, 2006 http://www.autoitscript.com/forum/index.ph...c=31674&hl= SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
Sundance Posted September 25, 2006 Author Posted September 25, 2006 Hiho, so i did it like Valuater suggested. Here is the code-snippet. Think its self-explaining greets Sundance ; test tooltip info on SoftwareList $hovered = GUIGetCursorInfo() If IsArray($hovered) And $hovered[4] <> 0 Then If $hovered[4] = $SoftListView Then $index = _GUICtrlListViewGetSelectedIndices($SoftListView,1) If IsArray($index) Then For $x = 1 to $index[0] If $index[$x] Then ToolTip($SoftwareIndexTip[$index[$x]+1]) EndIf Next EndIf Else ToolTip("") EndIf EndIf
Sundance Posted September 25, 2006 Author Posted September 25, 2006 Ups. Mmhhh. Haven't seen your last post Valuater. Gonna have a look at it. bye and thx
xcal Posted September 25, 2006 Posted September 25, 2006 Valuater was based on mine. Check out what gafrost posted, though. That's really what you want. Can do tooltips without needed to select. How To Ask Questions The Smart Way
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