PtList---attributs of items

Hi,

Can I set or change items with different colors, not the selection one?

For example:

QNX-Windows ------------------------- Text is red
QNX-Photon ------------------------- Text is yellow
Micro-Photon -------------------------- Text is green

Thanks


WeiBing Tong

Aquila Mining Systems Ltd.
1450 City Councillors, Suite 330
Montreal, QC
Canada H3A 2E6
Tel: (514) 874-9917 ext 239
Fax: (514) 874-4005
Email: wbtong@aquilamsl.com

WeiBing Tong <wbtong@aquilamsl.com> wrote:
: Hi,

: Can I set or change items with different colors, not the selection one?

: For example:

: QNX-Windows ------------------------- Text is red
: QNX-Photon ------------------------- Text is yellow
: Micro-Photon -------------------------- Text is green

I don’t think there’s a way to do this.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Steve Reid <stever@qnx.com> wrote:
: WeiBing Tong <wbtong@aquilamsl.com> wrote:
: : Hi,

: : Can I set or change items with different colors, not the selection one?

: : For example:

: : QNX-Windows ------------------------- Text is red
: : QNX-Photon ------------------------- Text is yellow
: : Micro-Photon -------------------------- Text is green

: I don’t think there’s a way to do this.

If you’re using Photon 2.0 (i.e. as part of the Realtime Platform), you
can use a PtRawList widget. PtRawList gives you more control over how the
items look – it lets you override the default drawing function.


Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Another workaround would be to create a PtScrollArea (PtScrollContainer in
Photon 2.0), have a PtGroup with vertical orientation as a children, and
have PtLabel widgets as children of the PtGroup.
Markus


“Steve Reid” <stever@qnx.com> wrote in message
news:8uentb$deh$3@nntp.qnx.com

Steve Reid <> stever@qnx.com> > wrote:
: WeiBing Tong <> wbtong@aquilamsl.com> > wrote:
: : Hi,

: : Can I set or change items with different colors, not the selection
one?

: : For example:

: : QNX-Windows ------------------------- Text is red
: : QNX-Photon ------------------------- Text is yellow
: : Micro-Photon -------------------------- Text is green

: I don’t think there’s a way to do this.

If you’re using Photon 2.0 (i.e. as part of the Realtime Platform), you
can use a PtRawList widget. PtRawList gives you more control over how the
items look – it lets you override the default drawing function.


Steve Reid > stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems

Another way is to build your own list widget with the required
functionnality…Kind’a fun and a good learning experience…

I posted such a custom widget at free@qnx.com more than 3 months ago but
last time I checked, the guys at QNX had not had time to process it and post
it in their ‘free-software’ archive on their web site. You might want to
look for it, I called the new widget a ‘PtCTList’.


“Markus Loffler” <loffler@ces.clemson.edu> wrote in message
news:8ueqht$k7l$1@inn.qnx.com

Another workaround would be to create a PtScrollArea (PtScrollContainer in
Photon 2.0), have a PtGroup with vertical orientation as a children, and
have PtLabel widgets as children of the PtGroup.
Markus


“Steve Reid” <> stever@qnx.com> > wrote in message
news:8uentb$deh$> 3@nntp.qnx.com> …
Steve Reid <> stever@qnx.com> > wrote:
: WeiBing Tong <> wbtong@aquilamsl.com> > wrote:
: : Hi,

: : Can I set or change items with different colors, not the selection
one?

: : For example:

: : QNX-Windows ------------------------- Text is red
: : QNX-Photon ------------------------- Text is yellow
: : Micro-Photon -------------------------- Text is green

: I don’t think there’s a way to do this.

If you’re using Photon 2.0 (i.e. as part of the Realtime Platform), you
can use a PtRawList widget. PtRawList gives you more control over how
the
items look – it lets you override the default drawing function.


Steve Reid > stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems