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:
parent
cb82aacb37
commit
252872cbb8
2 changed files with 15 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue