bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows with border in panels


From: Thomas Dickey
Subject: Re: Windows with border in panels
Date: Mon, 7 Aug 2006 18:09:08 -0400 (EDT)

On Sat, 5 Aug 2006, JKD wrote:


I've read in some tutorials that a trick to preserve a border (created with
box function) in a window is to create a smaller sub window, using subwin
function. But this trick fails when using panels. If I write in the window
linked to a panel, its border is erased due to scroll (I need scroll so I
can't disable it). When I write in its subwindow, border is preserved but
sub window is not really linked to the panel so it ovewrites any overlapped
panel. Any advice to manage bordered windows in panels?

If you make a derived/subwindow, it would be linked (since it shares memory). Make the panel's window have a box and use subwin() or derwin() to create a sub-window in that. You can use the set_panel_userptr() and panel_userptr() functions to keep track of the pointer to the sub-window, rather than storing that information separately.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]