View Single Post
Old 06-12-2019, 01:13 PM   #557
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,875
Default Q; How to refresh media explorer after scroll via API ?

Hi,


I'm tryong to scroll Media Explorer to a certain arbitrary pos,
the code works but the display isn't refreshed,
we can see the scrollbar scrolled a little to the bottom,
but the File List isn't refreshed, even when JS_Window_SetScrollPos return true.


Code:
local hWnd = reaper.JS_Window_Find("Media Explorer", true)
if hWnd == nil then return end  

local container = reaper.JS_Window_FindChildByID(hWnd, 0)
local file_LV = reaper.JS_Window_FindChildByID(container, 1000)
a = reaper.JS_Window_SetScrollPos( file_LV, "v", 80 )
reaper.JS_Window_Update( hWnd )
reaper.JS_Window_Update( container )
reaper.JS_Window_Update( file_LV )

I tried to push various Window Update without success.


What do I miss ?
X-Raym is offline   Reply With Quote