TextPropLabel backgroundColourId

4 posts / 0 new
Last post
Graeme
Offline
Last seen: 1 week 3 days ago
Joined: 7 Jan 2011 - 19:37
TextPropLabel backgroundColourId

Hi Jules, can you change the following constructor to not have a hard coded value for the backgroundColourId?

    TextPropLabel (TextPropertyComponent& owner_,
                   const int maxChars_, const bool isMultiline_)
        : Label (String::empty, String::empty),
          owner (owner_),
          maxChars (maxChars_),
          isMultiline (isMultiline_)
    {
        setEditable (true, true, false);

        setColour (backgroundColourId, Colours::white);
        setColour (outlineColourId, findColour (ComboBox::outlineColourId));
    }

jules
Offline
Last seen: 6 hours 11 min ago
Joined: 29 Apr 2013 - 18:37
Re: TextPropLabel backgroundColourId

Yeah, I guess that colour should be the same as the ComboBox::backgroundColourId. Although... I'm not sure why I hard-coded it like that, there might actually have been a good reason which I can't currently remember..

Graeme
Offline
Last seen: 1 week 3 days ago
Joined: 7 Jan 2011 - 19:37
Re: TextPropLabel backgroundColourId

Hi Jules. Shouldn't the colour id's here be the ones from Label instead of ComboBox?

jules
Offline
Last seen: 6 hours 11 min ago
Joined: 29 Apr 2013 - 18:37
Re: TextPropLabel backgroundColourId

Yes, they should! Thanks!