1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

added a showTextBox() method

This commit is contained in:
jules 2007-09-01 11:29:14 +00:00
parent cb82aacb37
commit 252872cbb8
2 changed files with 15 additions and 0 deletions

View file

@ -288,6 +288,14 @@ void Slider::setTextBoxIsEditable (const bool shouldBeEditable) throw()
valueBox->setEditable (shouldBeEditable && isEnabled());
}
void Slider::showTextBox()
{
jassert (editableText); // this should probably be avoided in read-only sliders.
if (valueBox != 0)
valueBox->showEditor();
}
void Slider::hideTextBox (const bool discardCurrentEditorContents)
{
if (valueBox != 0)

View file

@ -289,6 +289,13 @@ public:
*/
bool isTextBoxEditable() const throw() { return editableText; }
/** If the text-box is editable, this will give it the focus so that the user can
type directly into it.
This is basically the effect as the user clicking on it.
*/
void showTextBox();
/** If the text-box currently has focus and is being edited, this resets it and takes keyboard
focus away from it.