08-29-2008, 01:02 PM
This adds tooltips to a list box, search qm forum for the attachment for the tooltip functions
now the problem i have is when using keyboard UP/DOWN inside the list box the tooltips wont update, unless i actually click on the list item, is there a way to do it when keyboard has focus on the list box using UP/DOWN keys.
Thanks.
;\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3 4"
str lb3 e4
lb3 = "hey[]boo[]too[]joo"
if(!ShowDialog("Dialog2" &Dialog2 &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80A44 0x100 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 ListBox 0x54230101 0x200 4 42 96 48 ""
;4 Edit 0x54030080 0x200 4 26 96 14 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2020105 "" "" ""
ret
;messages
sel message
,case WM_INITDIALOG
,class CToolTip m_htt
,CToolTip-- tt
,tt.Create(hDlg)
,tt.AddTool(hDlg 3 "Select One")
,case WM_DESTROY
,case WM_SETCURSOR tt.OnWmSetcursor(wParam lParam)
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case LBN_SELCHANGE<<16|3
,str t
,_i=LB_SelectedItem(lParam t)
,sel _i
,,case else tt.AddTool(hDlg 3 t)
,case IDOK
,case IDCANCEL
ret 1now the problem i have is when using keyboard UP/DOWN inside the list box the tooltips wont update, unless i actually click on the list item, is there a way to do it when keyboard has focus on the list box using UP/DOWN keys.
Thanks.
