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 06-22-2005, 07:46 PM   #1
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
GTK+ dialog: how do I display buttons vertically???


Hi -

I have a pop-up window (a GtkDialog) that presents a list of about a dozen choices. I want to display these choices vertically. The action area seems to be an HBox. I need a VBox (or some way to make the action area behave like a VBox).

Here's the basic code:
Code:
  // Create dialog
  m_dialog1 = gtk_dialog_new ();
  gtk_window_set_title (GTK_WINDOW (m_dialog1), title);
  gtk_window_set_type_hint (GTK_WINDOW (m_dialog1),
    GDK_WINDOW_TYPE_HINT_DIALOG);
  ...
  // Get "action area" at bottom of dialog
  GtkWidget *dialog_action_area1 = GTK_DIALOG (m_dialog1)->action_area;
  gtk_widget_show (dialog_action_area1);
  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1),
    GTK_BUTTONBOX_END);

  // Add custom pushbuttons into the action area
  GtkWidget *button1 = gtk_button_new_with_mnemonic (_("1) Moe"));
  gtk_widget_show (button1);
  gtk_dialog_add_action_widget (GTK_DIALOG (m_dialog1), button1, 1);
  ...
  <= WE'RE DOING A BUNCH OF "ADD_ACTION_WIDGET'S" TO WHAT APPEARS TO
     BE AN HBOX.

     IS THERE ANY WAY TO CHANGE THE ACTION AREA INTO A VBOX INSTEAD?

     IF I CREATED AN INTERPOSED MY OWN VBOX, COULD I STILL
     DO "ADD_ACTION_WIDGET" INTO IT?
Any suggestions?

Thanx in advance .. PSM

Last edited by paulsm4; 06-22-2005 at 08:26 PM.
 
  


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
display compressed vertically borgward Linux - General 6 09-15-2005 07:05 PM
reaching to the notification area with gtk atokatli Programming 1 07-01-2005 01:35 PM
Dialog Buttons Reversed. jinksys Fedora 1 01-24-2005 01:23 AM
Shortcut buttons in GTK2 open dialog Lacek Linux - Software 0 06-09-2004 03:40 AM
invisible buttons in dialog windows jwhiz Linux - Newbie 3 12-28-2003 12:01 AM


All times are GMT -5. The time now is 08:57 AM.

Main Menu
Advertisement
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