At 03:38 PM 10/27/2004, you wrote:
In my app, the first form that comes up when the user clicks on the app icon
is the "MainForm". In the MainFormInit() function, I am setting colors of
various objects like UIObjectForeground, UIObjectFrame, UIFieldText etc.
When I launch the application, it doesn't reflect these colors on the
MainForm but if I visit any other form and revisit the MainForm, it reflects
all these colors perfectly.

Do you set those colors before the initial call to FrmDrawForm? You should

1) Set the drawing window to the whole screen
2) Set the UI colors
3) Draw your form

Step #1 is needed to avoid a problem with no window being set before the main form is drawn and that causing problems with the UI color calls.

Second thing is, in the same Init() function, I am calling FrmSetFocus() to
set focus to one of the control buttons on the form but it never shows it as
selected.

FrmSetFocus only lets you set the focus on fields and tables in most versions of Palm OS. With devices that use object navigation (Treo 600, Treo 650, Tungsten T5, Palm OS Cobalt 6.1), you should use 'fnav' resources and set the initial focused object ID value.



-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Fourm Archives: http://news.palmos.com/read/all_forums/



--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to