Yep, that is exactly what I want to do, but I don't know how to do the end of #3
- configure the enumerated list option based on which person is selected
I can't seem to find a good example... I can always add items to the list, but I don't know how to clear it.
> Date: Sun, 30 Nov 2008 15:01:08 -0800 > From: firstname.lastname@example.org > Subject: Re: [Gramps-devel] How to GUI question > To: email@example.com; firstname.lastname@example.org > > Craig, > > > I have a PersonOption field that I would like to populate an > > EnumeratedListOption or a FilterOption with the following: > > * Descendent report for (the person selected in > > PersonOption) only. > > * Descendent report for (the person selected in > > PersonOption) and Spouse #1 (F##) > > * Descendent report for (the person selected in > > PersonOption) and Spouse #2 (F##) > > > > I can make the list option field, but I can't seem to > > clear it for new data. And I am not sure how to make a new > > filter (if the option exists). > > > > Any help would be great. > > Assuming I understand you correctly, here is what I would do: > > 1) Use a person option to allow the user to select the main person. > 2) Add an enumerated list option which lists the spouses if there are more than one. > 3) Handle the "'value-changed'" event from the person option and configure the enumerated list option based on which person is selected. > 3a) If the selected person has zero or one spouse, then the enumerated list option is not available (set_available(False)). > 3b) If the selected person has two or more spouses, they are listed selectable from the enumerated list option. > > ~Brian
Proud to be a PC? Show the world. Download the “I’m a PC” Messenger themepack now. Download now.