I am having a bit of trouble creating panels with Curses.Could anyone here enlighten me by showing how things are properly done with examples?
#!/usr/bin/perl use strict; use Curses; { my ($row, $column); initscr(); getmaxyx(stdscr,$row, $column); cbreak(); #clear(); my $win = newwin($row, int($column/3), 0, 0); my $win1 = newwin($row, int($column/3), 0, int($column/3)-5); my $win2 = newwin($row, int($column/3), 0, int($column/3)*2-10); $win->box(0,0); $win1->box(0,0); $win2->box(0,0); $win->addstr(0,(int($column/3)-length("Main"))/2,"Main"); $win1->addstr(0,(int($column/3)-length("Status"))/2,"Status"); $win2->addstr(0,(int($column/3)-length("Help"))/2,"Help"); my $panel = $win->new_panel; my $panel1= $win1->new_panel; my $panel2 = $win2->new_panel; update_panels(); doupdate(); $win->refresh; $win1->refresh; $win2->refresh; $win->getch; #$win1->getch; #getch; endwin(); }
Many thanks in advance
In reply to Using Panels on Perl - Curses by tsuren
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |