How exactly are you generating the tSTR resource at runtime? It might be an idea to try creating a new Resource Database (DmCreateDatabase) at run time (and delete it on exiting - DmDeleteDatabase) which should not be read only.
Laurence. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Max Bian Sent: 09 January 2002 16:01 To: Palm Developer Forum Subject: Re: custom form help Please see below. --- Massimo Penta <[EMAIL PROTECTED]> wrote: > Hi > I'm trying to generate a custom form help (i.e. the help text is part of > my record and depends on the displayed record). I've tryed several > things, but without success: > 1) use a fixed string resource as the form helpID (the classical stuff) > and edit it at runtime. Fails because the application database (my PRC) > is in read-only mode. Is there any way to change that attrib when > buiding the PRC in CW8? > 2) try to generate a 'tSTR' resource at runtime and attach it to my app > resource DB. Same problem. Are you sure that is the case? I have been doing things similiar. My app creates new resources in itself at runtime. It works! I am not sure why you are saying it is in "read-only" mode. Did you get error messages when doing so? What are the errors you got? > > So I'm thinking about another solution: create another form with a non > editable text field in it and a done button; set the helpID in the > previous form to 0 (this erases the help icon on the form: the rounded > 'i' in top right corner), draw the help icon programatically when > loading the form, and trap a help icon tap in the form event handler. > But I have some questions: > 1) how do I draw the help icon to advice the user that some help is > available. Is there any caracter in some font that does it, or a bitmap > resource with a known ID? It is a character in symbol font: symbolHelp > 2) Since a tap on the help icon doesn't generate any particular event, I > assume i must capture a penDownEvent within the icon area, but what's > its position and extent? Simple way: Put the helpicon char as a label of a frameless button. To do it your way, the pendown event contains the screen coordinate in event->ScreenX and event->ScreenY. First you need to get the bounds of that icon you draw. > > Or, any other suggestion is welcome. Thanks, > Massimo ===== -=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=- Got Palm? Get ExBox at http://www.weirdwww.com/ExBox to beam anything! __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/ -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
