Forum | | | | - Page 1 - |
| Andreas Koch | Hello together,
I stand again once to one trouble. It's all right therefore, displayed To get, over welchem Listviewitem (slot, row) itself the Cursor straight befindet. my thought is, in the Anschluss on a simulierten Click Getcontrolparas abzufragen and the Whole in a Loop incorporate. has someone a idea, How to the make could or has it even made? I have attempts with mouse_event To works, but the not working.
lovely Greeting
Andreas cook |
| | | | |
| | « this Posting watts as Solution marked. » | | Thomas Freier | the had we still, I faith at schedule. here one mins. example for Tooltip:
$H windows.ph
$H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Declare LVHTI#,LView&,l%
Dim LVHTI#,LVHitTestInfo
Proc LV_HitTest
Parameters LV&,X%,Y%
~GetCursorPos(LVHTI#)
~ScreenToClient(LV&,LVHTI#)
SendMessage(LV&,~LVM_SUBITEMHITTEST,0,LVHTI#)
Return LVHTI#.SubItem&
ENDPROC
Cls
LView& = Create("GridBox",%hwnd,"Test 0;0;100;Test 1;0;100;Test 2;0;100;Bemerkung;0;100",0,20,10,410,200)
WhileLoop 0,4
AddStrings(LView&,"0 Test " + Str $(&Loop) + "|1 Test " + Str $(&Loop) + "|2 Test " + Str $(&Loop) + "|")
Wend
var Text$="Was is because at all one List view? \nOb tappt im dunkeln's believe or not. "+ \
"Sobald tappt im dunkeln ihren windows-PC switch on, appear already the first List view."+ \
"Wo, ask tappt im dunkeln? On their screen.\nDer windows screen is namely nothing other as one List view.\n"+ \
"(FRABBING)"
SetText LView&, 1, 3, Text$
sendmessage(Lview&,~LVM_SETEXTENDEDLISTVIEWSTYLE,0,~LVM_SUBITEMHITTEST)'markiert The row under the mouse
'sendmessage(LView&,0,~LVM_SETHOVERTIME,10) 'resolve useful one Click from ????
var ToolTip&=create("Tooltip",%hwnd,LView&,"")
var medit%=Create("MultiEdit",%hwnd,"",0,0,300,-400)
ShowWindow(medit%,0)
While 1
WaitInput 100
l% = LV_HitTest(LView&,%mousex,%mousey)
'
SELECT LVHTI#.Item&
CASEOF 1'ZEILE
If LVHTI#.SubItem&=3'ITEM
SetText medit%,GetText$(LView&,LVHTI#.Item&,LVHTI#.SubItem&)
Text$=""
Whileloop GetLineCount(medit%)'Number of lines
Text$=text $+GetLine$(medit%,&loop-1)+"\n"'single Lines read and Line break
Wend
settext ToolTip&,%hwnd,LView&,Text$
EndIf
CASEOF 3'ZEILE
settext ToolTip&,%hwnd,LView&,"erste Wahl"
OTHERWISE
settext ToolTip&,%hwnd,LView&,""
ENDSELECT
Wend
end
ought to sure on SubClassProc umgestellt go. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 05/22/13 ▲ |
| | |
| | | know do I not, but the wide the Split can imho with LVM_GETCOLUMNWIDTH detect, by less Mausposition-X might one so The slot herausbekommen.
there's but too LVM_GETITEMINDEXRECT ( [...] ) what Perhaps yet hilfreicher is.
Click vlt. simply so:
|
| | | | |
| | Thomas Freier | the had we still, I faith at schedule. here one mins. example for Tooltip:
$H windows.ph
$H commctrl.ph
Struct LVHitTestInfo = X&,Y&,flags&,Item&,SubItem&
Declare LVHTI#,LView&,l%
Dim LVHTI#,LVHitTestInfo
Proc LV_HitTest
Parameters LV&,X%,Y%
~GetCursorPos(LVHTI#)
~ScreenToClient(LV&,LVHTI#)
SendMessage(LV&,~LVM_SUBITEMHITTEST,0,LVHTI#)
Return LVHTI#.SubItem&
ENDPROC
Cls
LView& = Create("GridBox",%hwnd,"Test 0;0;100;Test 1;0;100;Test 2;0;100;Bemerkung;0;100",0,20,10,410,200)
WhileLoop 0,4
AddStrings(LView&,"0 Test " + Str $(&Loop) + "|1 Test " + Str $(&Loop) + "|2 Test " + Str $(&Loop) + "|")
Wend
var Text$="Was is because at all one List view? \nOb tappt im dunkeln's believe or not. "+ \
"Sobald tappt im dunkeln ihren windows-PC switch on, appear already the first List view."+ \
"Wo, ask tappt im dunkeln? On their screen.\nDer windows screen is namely nothing other as one List view.\n"+ \
"(FRABBING)"
SetText LView&, 1, 3, Text$
sendmessage(Lview&,~LVM_SETEXTENDEDLISTVIEWSTYLE,0,~LVM_SUBITEMHITTEST)'markiert The row under the mouse
'sendmessage(LView&,0,~LVM_SETHOVERTIME,10) 'resolve useful one Click from ????
var ToolTip&=create("Tooltip",%hwnd,LView&,"")
var medit%=Create("MultiEdit",%hwnd,"",0,0,300,-400)
ShowWindow(medit%,0)
While 1
WaitInput 100
l% = LV_HitTest(LView&,%mousex,%mousey)
'
SELECT LVHTI#.Item&
CASEOF 1'ZEILE
If LVHTI#.SubItem&=3'ITEM
SetText medit%,GetText$(LView&,LVHTI#.Item&,LVHTI#.SubItem&)
Text$=""
Whileloop GetLineCount(medit%)'Number of lines
Text$=text $+GetLine$(medit%,&loop-1)+"\n"'single Lines read and Line break
Wend
settext ToolTip&,%hwnd,LView&,Text$
EndIf
CASEOF 3'ZEILE
settext ToolTip&,%hwnd,LView&,"erste Wahl"
OTHERWISE
settext ToolTip&,%hwnd,LView&,""
ENDSELECT
Wend
end
ought to sure on SubClassProc umgestellt go. |
| | | Gruß Thomas Windows XP SP2, XProfan X2 | 05/22/13 ▲ |
| |
| | Andreas Koch | Hello your both,
integrally cordial Thanks for eure Answer. I wurschtel already whom whole day rum, but now works. Kurzes Feedback: circa Getcontrolparas benefit to, must to the pressing and the release simulate , was unfortunately for my ursprünglichen object not integrally suitable, functions but still with mouse_event. this Tooltip for List view was crept genial, very the I sought have. thanks.
PS: I had here time demand, whether one The Listviewposition (slot, row) the Editcontrols with the lever Getvar(0) detect can. the functions too with the method: one certainly with Getwindowrect position and measurement the Edits and uses subsequently whom Hittest with the Mittelwerten from getwindowrect. If the Whole in of/ one Loop with the Abbruchbedingung While Getvar(0) made becomes, get one constantly The actually position. |
| | | | |
| | | | | | | |
|
AnswerThemeninformationenthis Topic has 3 subscriber: |