Entering text in a field with FsetText

Postby Mikael on Wed Apr 23, 2003 10:10 am

I'm really stuck, so I have a few questions. Hope someone can help.

I'm trying to create my own keyboard by using a form created in PilRC. The test version only has two keys, in order to keep it simple. The problem is that I can't get it to type more than 1 char in a field using FsetText-despite the fact that MAXCHARS is set to 6. After looking at the docs I tried using REPEATBUTTONS instead. The trouble is that they are not handled by Fevent and I can't fully grasp Fctl (REPEAT) and FHAND, so now my code is going nowhere. The original code is like this:

//first keyboard test
#define FORM 3000
#define FIELD 3001
#define BITMAP1 4000
#define BITMAP2 4001
#define BITMAPCOLOR1 5000
#define BITMAPCOLOR2 5001
#define BUTTON1 6000
#define BUTTON2 6001

library "PToolboxLib"

include "Fctl.h"

int value1 = 81;
int value2 = 87;
char charVal;



Fctl(LOAD, 3000);
Fctl(DRAW, 3000);

while(1) {
switch(Fevent(1)) {

case 6000:
charVal =(char)value1;
case 6001:
charVal =(char)value2;

N.B. I'm not even sure if I should be using REPEATBUTTONS!?

Do I perhaps need more fields?

Is it necessary for me to define the objects in my applet as above as it seems to work fine without definitions(this question probably shows that I'm still not 100 % clear about the difference between Resource Forms and Dynamic Forms).

Also could someone please explain the following PilRc terms:

LOCALE (it seems to be a required field though I can find no explanation and only "enUS" as an example-which I assume means English US. If so, why do I need it?

USABLE -again I assume this makes a button 'usable', though why would someone have an unusable button?


Also, is there anywhere where I can download more 'newbie-friendly' docs for Pilrc. I've searched without success.

All help greatly appreciated,


Posts: 156
Joined: Sun Apr 13, 2003 9:19 am
Location: Denmark

Postby jstadolnik on Wed Apr 23, 2003 11:56 am

FsetText will overwrite all the text in a field. Use the Fctl INSERT command (#309) to append text to a field.


The PToolboxLib guy.
Posts: 1741
Joined: Wed Dec 06, 2000 3:34 am
Location: USA

Return to PocketC for Palm OS KB

Who is online

Users browsing this forum: No registered users and 1 guest