Re: How can I display the buttons in a dialog's action area vertically?
- From: Christopher Anderson <sidewinder asu gmail com>
- To: paulsm srccorp com
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How can I display the buttons in a dialog's action area vertically?
- Date: Thu, 23 Jun 2005 11:53:56 -0700
The documentation says the action_area is indeed a GtkHButtonBox. I
doubt that you can change this to a GtkVButtonBox, because that is not
the way dialog widgets normally behave. Perhaps, instead, you could
put all the choices as entries in a GtkComboBox. Then simply have the
usual Ok and Cancel buttons in your action_area. A dozen "choice"
buttons is a little overwhelming to a user, and also eats up a lot of
screen real estate.
Cheers,
Chris Anderson
On 6/22/05, Paul Santa Maria <paulsm1021 yahoo com> wrote:
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. Any suggestions?
Here's the basic code:
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);
...
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 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?
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]