The new table manager doesn't invert items anymore to
indicate selection. It apparently changes the colors and
calls your custom draw routine. You'll need to come up
with a way to determine if the item is being redrawn
"selected" or not and respond accordingly.
-- Paul
PS: be aware that another side effect is that any database
routines called by your draw routine need to be "safe". I
had to work around a problem where a row was being redrawn
after a record deletion and dying when it was unable to
find the record. Also the performance issue of redraw vs.
invert should be considered.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
> Behalf Of Gordon,
> Douglas
> Sent: Tuesday, February 22, 2000 9:42 AM
> To: Palm Developer Forum
> Subject: Table cell highlighting in color
>
>
> One of my views uses a table with text in the
> cells, for which I use a
> custom drawing procedure. After filling in the
> table, I also call
> "TblSelectItem" to highlight the current
> selection for the user. When run on
> PalmOS 3.5 on the color POSE, the normal text is
> black on white, and when
> highlighted it changes to white on dark blue
> (standard UI colors,
> apparently).
>
> Anyway, I decided to try using color to
> differentiate the table entries. It
> is trivial in my custom draw procedure to use
> WinSetTextColor to save and
> restore the text color when drawing the text.
> This works OK and I set some
> of the table entries to show up as green on
> white. However, when I call
> TblSelectItem on one of these entries, the
> highlighting apparently does not
> recognize my green text pixels and I end up with
> green on dark blue which is
> definitely ugly. To get around this, I am now
> doing my own highlighting by
> drawing white characters on a green-filled rectangle.
>
> I guess my point is that it is a bit more
> difficult than I expected to make
> use of different colors even in a fairly simple
> app. There are some other
> fields that I could use color in, but it's not
> clear exactly how the UI
> colors can be manipulated at exactly the right
> time for the system to draw
> them without having to add a lot of custom
> drawing code. Has anyone else had
> good or bad luck in implementing color into
> their existing apps? Does the
> color API in 3.5 seem adequate, or are there
> some essential features that
> are "missing"?
>
> Doug Gordon
>
> --
> For information on using the Palm Developer
> Forums, or to unsubscribe, please see
> http://www.palm.com/devzone/mailinglists.html
>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html