View Single Post
Old 09-16-2020, 03:30 PM   #10
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 9,954
Default

Quote:
Originally Posted by Coachz View Post
So what code do I need to enable grid lines ? I'm not getting how config variables work.

-- enable grid lines
retval = reaper.SNM_SetIntConfigVar( "projshowgrid", 1)
That's it but you also need a
Code:
reaper.UpdateArrange()
to trigger a redraw.
(For a more detailed rundown about config vars see here.)

edit:
Nah, this is wrong sorry, as it turns all the other bits off.
This should be the one:
Code:
enableOK = reaper.SNM_SetIntConfigVar("projshowgrid", reaper.SNM_GetIntConfigVar("projshowgrid", -666)|1) -- bitwise OR, set bit

Last edited by nofish; 09-16-2020 at 03:40 PM.
nofish is offline   Reply With Quote