Using color in a Pt_List

bridged with qdn.public.qnx4.photon
Post Reply
Joan Baucells

Using color in a Pt_List

Post by Joan Baucells » Thu Jan 15, 2004 2:06 pm

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

paulista

Re: Using color in a Pt_List

Post by paulista » Thu Jan 15, 2004 4:28 pm

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

Re: Using color in a Pt_List

Post by Joan Baucells » Fri Jan 16, 2004 7:20 am

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) .

Wojtek Lerch

Re: Using color in a Pt_List

Post by Wojtek Lerch » Fri Jan 16, 2004 7:56 pm

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.

Post Reply

Return to “qdn.public.qnx4.photon”