LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-03-2005, 10:07 AM   #1
naomi
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Rep: Reputation: 0
C programming HELP, ncurses window functions


I'm new to C and i just figured out how to associate a window with a menu...
my question is... Is there any way I could resize the window.... I've been looking in man for hours and I can't seem to find a solution

Here is my code:

/* Create the window to be associated with the menu */
my_menu_win = newwin(12, 0, 2, 0);

/* Set main window and sub window */
set_menu_win(my_menu, my_menu_win); /*??*/
set_menu_sub(my_menu, derwin(my_menu_win, 0, 0, 1, 1));
set_menu_format(my_menu, 10, 1);

box(my_menu_win, 0, 0);
post_menu(my_menu);
wrefresh(my_menu_win);

PS: also what is the set_menu_sub for?
 
Old 02-03-2005, 01:57 PM   #2
Genjix
Member
 
Registered: Oct 2003
Location: Pico
Distribution: SUSE 9.1
Posts: 83

Rep: Reputation: 15
you might find this helpful (dont know ncurses myself ) http://howtos.linux.com/howtos/NCURS...TO/index.shtml
 
Old 02-03-2005, 09:06 PM   #3
Bluesuperman
Member
 
Registered: Nov 2002
Distribution: Slackware
Posts: 155

Rep: Reputation: 30
Hello,

Depending on your requirements or interest pdmenu may provide a better fit then ncurses. I was going to use ncurses to provide a menu based console app. So non-linux users could SSH in and be provided with a menu only option.

This way I would not have to worry so much about then typing .... pdmenu worked great.



Michael.
 
Old 02-06-2005, 05:54 AM   #4
naomi
LQ Newbie
 
Registered: Jan 2005
Posts: 7

Original Poster
Rep: Reputation: 0
tnks for the site.. it helped a lot...
anyways...i decided to use panels-menu-window instead of resizing the window it works great
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ncurses, how to scroll window nazir Programming 1 08-05-2005 11:32 AM
C Programming: Help with Pointers to Functions devinWhalen Programming 2 03-04-2005 01:00 PM
ncurses window and keypad vegpl Programming 2 11-01-2004 02:00 AM
Parallel programming with ncurses problem StressedLemming Programming 4 02-26-2004 11:54 AM
X window programming?? newbieME Programming 14 04-25-2003 05:16 PM


All times are GMT -5. The time now is 10:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration