Re: GTK OPTION MENU
- From: Jean Bréfort <jean brefort normalesup org>
- To: Mohit Kumar <mohit kumar gmail com>
- Cc: gtk-list gnome org
- Subject: Re: GTK OPTION MENU
- Date: Tue, 10 May 2005 14:26:24 +0200
Le mardi 10 mai 2005 �7:31 +0530, Mohit Kumar a �it :
> Hi All,
>
> This question is pretty trivial, but I have been unable to find a
> solution to this and hence I am posting it here, hoping to get a
> solution frmo anyone of you.
>
> The scenario is this, I have a list of Names to be displayed in the
> GTK OPTION MENU. Now, the list of names is static. When the user
> re-opens the dialog, I want the OPTION MENU to show the last selected
> name, instead of the first name in the list. I am storing the name in
> some structure.
>
> Is there any way to do it? Or i need to draw the OPTION MENU with the
> selected name as the first list member( I want to avoid this because
> they are in aphabetical order).
>
> For eg. Say the names are
> Albert<-----
> Charlie
> John
> Nathan
>
> And the user selects John, then when he reopens the dialog he should see
>
> Albert
> Charlie
> John<------
> Nathan
>
> In between the 2 calls, the windows is destroyed.
>
> Any help is highly appreciated.
You can use gtk_option_menu_set_history. But GtkOptionMenu is deprecated
and you should consider to use GtkComboBox instead.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]