Using color with CControls?

Discuss PocketC for Palm OS (including Desktop Edition)

Postby g.palandri on Tue Mar 09, 2004 7:53 am

Hi, anybody knows how to (if this is possible) use colors with Mario's CControls? I develop an application using that library, and now I would like to add colors.

Thank in advance, bye.

Posts: 26
Joined: Mon Nov 18, 2002 4:32 pm
Location: Italy

Postby dcalp on Wed Mar 10, 2004 9:41 am

Hi Giorgio:
I was looking for the same some time ago and perhaps you could use this native library

I didn't try it myself, but I think you could call the color functions before draw the CControls GUI elements.

Kind regards


Pocket VisualForms
Visual design for PocketC

Pocket VisualForms
Visual design for PocketC
Posts: 115
Joined: Thu Dec 06, 2001 9:53 am
Location: Argentina

Postby dewey on Wed Mar 10, 2004 2:36 pm

PocketC v6 introduced color APIs, which provide all the APIs you need to make this happen (including an API to retrieve the current UI color settings so that the UI matches the user's preferences).
Site Admin
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Postby Steven on Wed Mar 10, 2004 6:00 pm

To use color with CControls, set the foreground color to the desired color BEFORE calling CDraw. Since CControls use standard PocketC drawing commands, anything which will change the color of drawing commands changes the color of any controls drawn after the color change.
Posts: 25
Joined: Tue Apr 02, 2002 6:23 pm

Return to PocketC for Palm OS

Who is online

Users browsing this forum: No registered users and 1 guest