Hiding Notebooks Embedded in Panels

I am getting funky behavior for an embedded notebook in a panel with the following basic code ...

// function to create panel and embed notebook

Function ShowPanel()
...
    NewNotebook/F=1/N=notefield/W=(...)/HOST=#/OPTS=(2)
    Notebook LogbookPanel#notefield, statusWidth=0,autosave=0,font=...
...
end

// function to toggle note field on or off (visible + writable or hide + protect)

Function SetNotes(onoff)
    variable onof

    ...
    Notebook LogbookPanel#notefield visible=!onoff
    return 0
end


The note field disappears as it is supposed to. When it reappears, the previously entered text is white and the embedding frame around the notebook is missing. I have to scroll the notebook, and even then some of the text stays missing.

I've attached a picture of the framed notebook (which is how it starts) and the unframed notebook (which is how it improperly appears after hiding and reshowing).

What am I missing here?
I see the problem on Macintosh, not on Windows. We will investigate.

Here is a complete example with a workaround:

Function ShowPanel()
    DoWindow/F LogbookPanel
    if (V_flag == 0)
        NewPanel /N=LogbookPanel
        NewNotebook/F=1/N=notefield/HOST=#/OPTS=(2)
        Notebook LogbookPanel#notefield, statusWidth=0,autosave=1
    endif
end
 
Function ShowNote()
    Notebook LogbookPanel#notefield visible=1
   
    // This is a workaround for failure to show text in embedded notebook
    Notebook LogbookPanel#notefield backRGB=(65535,65535,65535)
End

Function HideNote()
    Notebook LogbookPanel#notefield visible=0
End

hrodstein wrote:
I see the problem on Macintosh, not on Windows. We will investigate.


Yes ... I should have said I was on a Mac -- I had not yet tested on Windows.

I've "installed" the fix as ...
#ifdef Macintosh
    // This is a workaround for failure to show text in embedded notebook
    if (onoff==0)
        Notebook LogbookPanel#notefield backRGB=(65535,65535,65535)
    endif
#endif


... and that at least brings back the text.

Thanks.

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville