Using color in a Pt_List

Does anybody know how to change color on a Pt_List single text item?

Joan Baucells wrote:

Does anybody know how to change color on a Pt_List single text item?

Hello
Maybe I did not understand your question, but to do something like this
you can use Pt_BROWSE_MODE in Select Mode (Pt_ARG_SEL_MODE) .

Thank you for the answer, but I’m asking for another thing. I’ll ask with
more detail:

A PtList widget is a scrolling list of text items. You can easily add,
delete or modify those items using
convenience functions PtListAddItems(), PtListDeleteItems() and
PtListReplaceItems() among many others.

You can easily change the color for the entire widget changing the
Pt_ARG_COLOR resource.

My questios is how can I change the color for a single text item inside the
PtList widget? I need to have different colors
in the same to do some visual grouping of the text items.

NOTE: As this newsgroup will become read-only I’ll continue this discussion
in the new qnx.gui



paulista wrote:

Joan Baucells wrote:

Does anybody know how to change color on a Pt_List single text item?

Hello
Maybe I did not understand your question, but to do something like this
you can use Pt_BROWSE_MODE in Select Mode (Pt_ARG_SEL_MODE) .

Joan Baucells <“Joan Baucells”@nospam.es> wrote:

Thank you for the answer, but I’m asking for another thing. I’ll ask with
more detail:

A PtList widget is a scrolling list of text items. You can easily add,
delete or modify those items using
convenience functions PtListAddItems(), PtListDeleteItems() and
PtListReplaceItems() among many others.

You can easily change the color for the entire widget changing the
Pt_ARG_COLOR resource.

My questios is how can I change the color for a single text item inside the
PtList widget? I need to have different colors
in the same to do some visual grouping of the text items.

There’s no way to do that in Photon 1.14. PtList only allows two sets
of colours: one for selected items and one for unselected items. You
would have to write your own widget class, perhaps using PtGenList.