Changing combobox font
-
hello !
is there a way to change the combobox text font ?
tried with JSON but not working.Thanks.
-
I don't think so but you could always create a custom combo box with a panel
-
I think it's overdue to make something like
Engine.setGlobalFont()
so people can use their customised font for almost every text thingie. -
Did this ever happen? I'm looking to change my combo box font as well.
-
@dustbro I don't see a globalfont function in the API yet
-
The development branch is your friend here:
HISE/hi_scripting/scripting/api/ScriptingApi.h at 93d23444d031788bf0bdd9741effa56ba0f9a006 · christophhart/HISE
The open source framework for sample based instruments - HISE/hi_scripting/scripting/api/ScriptingApi.h at 93d23444d031788bf0bdd9741effa56ba0f9a006 · christophhart/HISE
GitHub (github.com)
Currently it uses the font for the Combobox texts and the Slider Value Popups (there are also new methods to change their appearance, but I need to look up how I implemented it a few weeks ago and write a doc).
-
@christoph-hart Is there a method to change the text size of a combo box? Because my custom font is coming out tiny. Also I noticed that setting the global font also affects some of the text of the HISE interface too!
-
@d-healey following
-
@d-healey said in Changing combobox font:
@christoph-hart Is there a method to change the text size of a combo box? Because my custom font is coming out tiny. Also I noticed that setting the global font also affects some of the text of the HISE interface too!
Same here. When I investigated around the Hise sources I found that ComboBox is a JUCE module and there's no way (apparently) to set the font size after using the globalfont function as you can see from the code :(
void ComboBox::paint (Graphics& g) { getLookAndFeel().drawComboBox (g, getWidth(), getHeight(), isButtonDown, label->getRight(), 0, getWidth() - label->getRight(), getHeight(), *this); if (textWhenNothingSelected.isNotEmpty() && label->getText().isEmpty() && ! label->isBeingEdited()) { g.setColour (findColour (textColourId).withMultipliedAlpha (0.5f)); g.setFont (label->getLookAndFeel().getLabelFont (*label)); g.drawFittedText (textWhenNothingSelected, label->getBounds().reduced (2, 1), label->getJustificationType(), jmax (1, (int) (label->getHeight() / label->getFont().getHeight()))); } }
-
Yep we are now needing this too
-
@Lindon Bump Bump - REALLY needing this now.
-
- added font property to combobox · christophhart/HISE@cd0eb5a
The open source framework for sample based instruments - - added font property to combobox · christophhart/HISE@cd0eb5a
GitHub (github.com)
-
@Christoph-Hart Today is a productive day :D
-
Yeah, just crawling through the stuff that has piled up...
-
@Christoph-Hart OK I can set the font, any way I can change the font size?
-
@Lindon Actually you can ;)
-
-
@Lindon Font options is under the items list.
-
-
@Lindon When did you last rebuild? My version is from the 25th of September.