Icon Sample Code

Discuss OrbForms Designer and PocketC Architect

Icon Sample Code

Postby destroyers on Thu Feb 21, 2008 5:16 am

I am new to this type of development. However, can someone please post a sample or tell me how to display an icon next to a label. I am currently using HS2_More_Icons.prc. How do I access icons in this file for use within my application? Also, how do I set the icon for the application that users can see on the palm?
Posts: 1
Joined: Thu Feb 21, 2008 5:09 am

Re: Icon Sample Code

Postby dewey on Sat Mar 01, 2008 8:42 am

It looks like the .prc file you mentioned is an Agendus icon database. I don't know what format they are storing the icons in, so I can't help you with that. However, drawing an image next to a text label is very simple.
1. Create a Bitmap resource (in OrbForms Designer, right-click "Bitmaps" in the project tree and select "Add ..."). In PocketC Architect, add a "bitmap" statement to your @app definition. See samples\ChessClock\ChessClockRes.ocp for a sample.
2. Add the Bitmap to a form. In OrbForms Designer, right-click in the form and select "Add Bitmap". In PocketC Architect, use the OrbC Resource language to add it to your form. Look for UIFBitmap in the "OrbC resource langauge" sections of the docs.

You set the app icon in OrbForms Designer by clicking on the "icon" node in the project tree and setting its properties. In PocketC Architect, you add an "icon" statement to you @app declaration. See any of the samples for an example.
Site Admin
Posts: 749
Joined: Sun Oct 21, 2007 5:12 am

Return to OrbForms Designer and PocketC Architect

Who is online

Users browsing this forum: No registered users and 2 guests