bug-ncurses
[Top][All Lists]
Advanced

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

Panels and Pads


From: Sadrul H Chowdhury
Subject: Panels and Pads
Date: Wed, 17 Jan 2007 09:21:37 -0500

Hi. I am going to need to allow large dialogs in my ncurses application (gaim-text). So I am trying to use pads. However, as it turns out, I cannot create a panel with a pad in it. So I am using the following hack, which seems to work quite alright:

pad->_flags &= ~_ISPAD;
win = derwin(pad, MIN(screen_height, widget_height),
              MIN(screen_width, widget_width), 0, 0);
panel = new_panel(win);
pad->flags |= _ISPAD;


Most of the operations, like refreshing, printing text, moving etc. seems to work pretty well. When it comes to resizing, I do wresize on 'pad', recreate 'win' and 'panel' as above. But it causes the window to disappear from the screen, and never reappear again. Is there some magic I can do to make it work? Or is there a better way of doing what I am trying to do?

Cheers,
Sadrul

reply via email to

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