At 03:50 PM 12/2/2003, Ben Summers wrote:However, I can't seem to get the focus ring to be drawn over the default
buttons in my forms. This is in the simulator, and on the real hardware.
Is your form in object focus mode rather than application mode?
Yes. I don't think it shows the ring at all in application mode.
I have solved it now... It seems that POL is messing around with the focus when the form opens. The following code at the end of the OnOpenPost function makes everything work as expected:
// Make sure the right object has the focus on the Treo
SetFocus(IdOfDefaultButton);
{
CControl c;
c.Attach(this, IdOfDefaultButton);
c.DrawControl();
}(or CField if it's a field rather than a control)
This doesn't appear do anything bad with non-Treo devices. (apart from unnecessarily redrawing the form item, of course).
I'm using POL with Codewarrior 9.2, if that makes a difference.
PS: I've written a quick perl script to make writing fnav resources very
easy, if anyone wants it.
PilRC 3.0 beta 4 makes writing them really easy too, if you're using RCP
format resources. Get it from sourceforge.net/projects/pilrc -- you can
use it with CW 9.2 by replacing the pilrc.exe file in the
bin\plugins\support\Palm_OS folder.
I admit it, my script doesn't add that much, just a bit more readability. :-)
Thanks for the thoughts.
Ben
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
