# LookAndFeel tutorial?

**URL:** <https://forum.juce.com/t/lookandfeel-tutorial/18309>\
**Category:** General JUCE discussion\
**Created:** [July 5, 2016, 7:24am UTC](https://forum.juce.com/t/lookandfeel-tutorial/18309 "2016-07-05T07:24:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathaniel\_Perez](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nathaniel_perez/32/1009_2.png) [@Nathaniel\_Perez](https://forum.juce.com/u/Nathaniel_Perez)\
**Post date:** [July 5, 2016, 7:24am UTC](https://forum.juce.com/t/lookandfeel-tutorial/18309/1 "2016-07-05T07:24:38Z")

</div>

Hi all,

I am trying to understand how to work with LookAndFeel classes, is there some basic tutorial somewhere?  
Specifically I need a combo box with transparent background. How can LookAndFeel help?

Thank you

Nathaniel

---

<div class="post-metadata">

**Author:** ![daniel](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/daniel/32/790_2.png) [@daniel](https://forum.juce.com/u/daniel)\
**Post date:** [July 5, 2016, 7:45am UTC](https://forum.juce.com/t/lookandfeel-tutorial/18309/2 "2016-07-05T07:45:22Z")

</div>

The gui components are drawn by methods from look and feel classes. So there is one set as default and the component instances aggregate the drawing function using the LnF.  
i.e. the code you are looking for is here:

> <https://github.com/WeAreROLI/JUCE/blob/master/modules/juce_gui_basics/lookandfeel/juce_LookAndFeel_V2.cpp>

So to alter this drawing you would derive from the look and feel class you prefer and override the drawComboBox method. Then you need to have an instance of your new look and feel class (using ScopedPointer is prefered) and set it to your component via [Component::setLookAndFeel()](https://www.juce.com/doc/classComponent#a6f2c10cd9840844a5be16e5deeef6f50).

In your case you don’t need to override the drawComboBox, if you want to change the colours. Simply use [Component::setColour()](https://www.juce.com/doc/classComponent#a875e6cc05407cea2d6a04dced62e13cd) like this should work:  
`myComboBox.setColour (ComboBox::backgroundColourId, Colours::black.withAlpha (0.0));`

Good luck

BTW @juce there used to be a tutorial for this IIRC, is it in a makeover or did it get lost?

---

<div class="post-metadata">

**Author:** ![Nathaniel\_Perez](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/nathaniel_perez/32/1009_2.png) [@Nathaniel\_Perez](https://forum.juce.com/u/Nathaniel_Perez)\
**Post date:** [July 5, 2016, 7:47am UTC](https://forum.juce.com/t/lookandfeel-tutorial/18309/3 "2016-07-05T07:47:55Z")

</div>

> [@daniel](#):
>
> ing you would dreive from the look and feel class you prefer and override the drawComboBox method. Then

thanks for this very fast answer!!
