Or maybe it is a
Header_GetItem / Header_GetItemText function that we missed ?
Anyway, here is some code for testing
Code:
reaper.ClearConsole()
function Msg( value )
reaper.ShowConsoleMsg( tostring( value ) .. "\n" )
end
function GetMediaExplorer()
local title = reaper.JS_Localize("Media Explorer", "common")
local arr = reaper.new_array({}, 1024)
reaper.JS_Window_ArrayFind(title, true, arr)
local adr = arr.table()
for j = 1, #adr do
local hwnd = reaper.JS_Window_HandleFromAddress(adr[j])
-- verify window by checking if it also has a specific child.
if reaper.JS_Window_FindChildByID(hwnd, 1045) then -- 1045:ID of volume control in media explorer.
return hwnd
end
end
end
explorer = GetMediaExplorer()
file_LV = reaper.JS_Window_FindChildByID(explorer, 1001)
header = reaper.JS_ListView_GetHeader( file_LV )
count = reaper.JS_Header_GetItemCount( header )
for i = 0, count - 1 do
-- text, state = reaper.JS_ListView_GetItem( header, 0, i ) -- this returns state = 0
cell = reaper.JS_Window_FindChildByID( header, i ) -- this reutrns nul
Msg(cell)
end
Thx!