git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4445 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
michael 1999-06-21 04:38:35 +00:00
parent d537e4dea2
commit a93a1e4f8a
6 changed files with 22 additions and 2 deletions

View file

@ -82,6 +82,16 @@
{
ASSIGN(popup_button, popb);
}
- (void)setPullsDown:(BOOL)pull
{
pull_down = pull;
}
- (BOOL)pullsDown
{
return pull_down;
}
@end
//
@ -121,6 +131,7 @@
[super initWithFrame:frameRect];
list_items = [[NSPopUpButtonMatrix alloc] initWithFrame:frameRect];
[list_items setPopUpButton:self];
[list_items setPullsDown:flag];
is_up = NO;
pulls_down = flag;
selected_item = 0;
@ -159,7 +170,10 @@
- (void)buttonSelected:(id)sender
{
selected_item = [self indexOfItemWithTitle:[sender title]];
if (!pulls_down)
selected_item = [self indexOfItemWithTitle:[sender title]];
else
selected_item = 0;
[self synchronizeTitleAndSelectedItem];