Also add layout-friendly constructor for BOptionPopUp (not yet tested)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33757 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2009-10-25 10:49:28 +00:00
parent ba69bf196e
commit 510fae5f1d
2 changed files with 14 additions and 0 deletions

View File

@ -24,6 +24,10 @@ public:
bool fixed, uint32 resizeMask
= B_FOLLOW_LEFT | B_FOLLOW_TOP,
uint32 flags = B_WILL_DRAW);
BOptionPopUp(const char* name,
const char* label, BMessage* message,
uint32 flags = B_WILL_DRAW);
virtual ~BOptionPopUp();
BMenuField* MenuField();

View File

@ -63,6 +63,16 @@ BOptionPopUp::BOptionPopUp(BRect frame, const char *name, const char *label,
}
BOptionPopUp::BOptionPopUp(const char* name, const char* label,
BMessage* message, uint32 flags)
: BOptionControl(name, label, message, flags)
{
BPopUpMenu *popUp = new BPopUpMenu(label, true, true);
fMenuField = new BMenuField("_menu", label, popUp);
AddChild(fMenuField);
}
BOptionPopUp::~BOptionPopUp()
{
}