[Libreoffice] setting the background color of an Edit

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Dec 4 10:05:10 PST 2011

Hello Kohei,

> You are almost there.  IIRC there is some quirk with setting a
> background color with the Edit control; you need to set fore ground
> color before setting the background color in order to change the
> background color.  No idea whether it's a bug or not (I think it is),
> but that's how I did it.
> You can take a look at formula::RefEdit::SetRefValid() method to see
> how I did it.

It seems that does not work for an Edit. I can set the font color with
SetForegroundColor but the SetBackgroundColor has no effect. I now
solved the problem by changing the color of the FixedText I use for
the information text. That is not that nice but better than nothing
and I have not enough time to fix the bug.

Thanks for your code pointer.


More information about the LibreOffice mailing list