Re: Multiple text colors in a GtkEntry
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: gtk-list gnome org
- Subject: Re: Multiple text colors in a GtkEntry
- Date: Wed, 19 Jul 2006 10:53:41 +0200
On Wed, Jul 19, 2006 at 09:12:40AM +0200, Murray Cumming wrote:
> We can use gtk_widget_modify_text() to change the color of the text in a
> GtkEntry. But is there any existing way to specify different colors for
> parts of the text, without using a TextView? This is for embedded use, and
> TextView would probably demand too much memory.
>
> If not, how might this be implemented? Maybe somebody has done it before.
You can try to subclass GtkEntry, override its expose method
and invent some coloring there, draring the colored layout
insted of the original one. However this is fragile and
seems to require copy of a large amount of GtkEntry code to
your new widget. So a completely new widget based on
GtkEntry code might be preferable.
In any case, if one entry is used for several pieces of
information I would consider the use of several entries.
Yeti
--
Anonyms eat their boogers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]