1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-09 23:34:20 +00:00

added ComboBox::showEditor() method

This commit is contained in:
jules 2007-08-28 10:29:07 +00:00
parent 4e753162c5
commit 7e2136a6e5
2 changed files with 15 additions and 1 deletions

View file

@ -81,7 +81,7 @@ void ComboBox::setEditableText (const bool isEditable)
bool ComboBox::isTextEditable() const throw()
{
return label->isEditableOnDoubleClick() || label->isEditableOnSingleClick();
return label->isEditable();
}
void ComboBox::setJustificationType (const Justification& justification) throw()
@ -376,6 +376,13 @@ void ComboBox::setText (const String& newText,
repaint();
}
void ComboBox::showEditor()
{
jassert (isTextEditable()); // you probably shouldn't do this to a non-editable combo box?
label->showEditor();
}
//==============================================================================
void ComboBox::setTextWhenNothingSelected (const String& newMessage) throw()
{

View file

@ -264,6 +264,13 @@ public:
void setText (const String& newText,
const bool dontSendChangeMessage = false) throw();
/** Programmatically opens the text editor to allow the user to edit the current item.
This is the same effect as when the box is clicked-on.
@see Label::showEditor();
*/
void showEditor();
//==============================================================================
/** Registers a listener that will be called when the box's content changes. */
void addListener (ComboBoxListener* const listener) throw();