Jörg Sellmeyer | I had the Topic of course Schonmal on Done gestzt but Perhaps can Roland there yet what make, so that the Treeview-Conttol itself there something windowskonformer behave.
Hi,
one can yes a Treeview wonderful with the keyboard steer. unfortunately comes the but not Program on. The Tastaturnavigation functions of course but WaitInput won't durchbrochen. Very slight on the example in the Help nachzuvollziehen. I Have only the "Print %key,%message" eingefügt. Treeview with mouse enable: values go displayed moreover with keyboard: it happens only yet what in the Treeview
CLS
var hToolBmp& = create("HPIC", 0, "TOOLBAR")
var hIL& = Create("ImageList", 16, 16, hToolBmp&, rgb(192, 192, 192))
var hTV& = Create("TreeView",%hwnd,hIL&,420,40,200,(height(%HWnd)-70))
DeleteObject hToolBmp&' won't More needed
print "Profan-Kringel: ";ImageList("AddIcon", hIL&, create("hIcon", "A"));""
print "Klassen: ";classof(hTV&);tab(24);classof(hIL&)
print "Handles: ";hTV&;tab(24);hIL&
var HeaderEbene& = TreeView("InsertItem",hTV&, 0,0,"Includes/Header")
var ProcEbene& = TreeView("InsertItem",hTV&, 0,1,"Prozeduren")
var StrukturEbene& = TreeView("InsertItem",hTV&, 0,2,"Strukturen/Klassen")
var KommentarEbene& = TreeView("InsertItem",hTV&, 0,3,"Kommentare/Faltungen")
TreeView("InsertItem",hTV&, HeaderEbene&,4,"Text 1")
TreeView("InsertItem",hTV&, ProcEbene&,5,"Text 2")
TreeView("InsertItem",hTV&, StrukturEbene&,6,"Text 3")
TreeView("InsertItem",hTV&, KommentarEbene&,7,"Text 4")
TreeView("InsertItem",hTV&, KommentarEbene&,52,"Text 5")
var T6& = TreeView("InsertItem",hTV&, KommentarEbene&,9,"Text 6")
TreeView("InsertItem",hTV&, T6&,10,"Text 7")
TreeView("SetItemImage",hTV&, KommentarEbene&,10)
TreeView("SetChildren",hTV&, Procebene&,1)
TreeView("SetChildren",hTV&, HeaderEbene&,1)
TreeView("SetChildren",hTV&, StrukturEbene&,1)
TreeView("SetChildren",hTV&, KommentarEbene&,1)
TreeView("SetChildren",hTV&, T6&,1)
TreeView("Expand",hTV&, ProcEbene&, 2)
SetText hTV&, HeaderEbene&,"Includes/Header (2)"
SetText hTV&, ProcEbene&,"Prozeduren (3)"
SetText hTV&, StrukturEbene&,"Strukturen/classes (4)"
SetText hTV&, KommentarEbene&,"Kommentare/Faltungen (99)"
TreeView("Select",hTV&, T6&)
print "Anzahl: ";GetCount(hTV&);tab(24);getCount(hIL&)
DrawIcon hIL&, 10, 420, 15
var end% = 0
var item& = 0
usermessages Ord("p")
whilenot end%
waitinput
Print %key,%message
if %key = 27
end% = 1
elseif clicked(hTV&)
item& = TreeView("GetSelected", hTV&)
print GetText$(hTV&, item&);".";GetText$(hTV&, TreeView("GetParent", hTV&, item&))
endif
endwhile
Originalthread: [...] |
|