What does a redraw have to do with the current selection? The selected item
works fine, this is a visual thing. Specifically (it was late when I posted
this message last night), what happens when I click on a new item in LB1,
the previously highlighted item redraws with the text non-highlighted and
the rest of the line highlighted.. and the new item clicked highlights just
the part with the text and the rest of the line non-highlighted.

This only happens when I call FrmDrawForm or FrmUpdateForm from the
lstSelectEvent as noted below. But since I am making several changes to the
screen based on the new selection, the screen needs a refresh. This works
fine on OS3.5, not on 3.3, and I've yet to test it on others.

----------
Bradly J. Barton - [EMAIL PROTECTED]
Jenies Technologies Incorporated
(972) 602-1835
http://www.JTI.net
http://PalmInHand.com
----- Original Message -----
From: "DeAnna Davidson" <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Monday, July 24, 2000 8:58 AM
Subject: RE: List Redraw Problem


> I assume what you're saying is that when you redraw you want to maintain
the
> selection of whatever was in the first list box.  When you redraw the
list,
> make sure you LstSetSelection to the selection you got before.
>
> DeAnna
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Bradly
> > J. Barton
> > Sent: Monday, July 24, 2000 2:51 AM
> > To: Palm Developer Forum
> > Subject: List Redraw Problem
> >
> >
> > I have a problem that is just slaying me here.. it isn't a
> > problem on OS 3.5
> > (my IIIc), but it does happen on 3.3... my experience has shown
> > me that when
> > this happens, I'm doing it wrong :)
> >
> > Ok.. I have a Modal Dialog with two listboxes. Both of them are
> > dynamically
> > drawn using custom drawing functions and what appears in LB2 is directly
> > related to what is selected in LB1. The problem is when I select
> > an item in
> > LB1 and redraw the form, the highlight goes all screwball... please
help..
> > here is a snippet of code that I am using now:
> >
> > case lstSelectEvent:
> >    {
> >    switch (pEvent->data.ctlEnter.controlID) {
> >    case CoverCategoriesList:
> >     {
> >      FormPtr pForm = FrmGetActiveForm();
> >      ListPtr list = FrmGetObjectPtr(pForm, FrmGetObjectIndex(pForm,
> > CoverCategoriesList));
> >      Word sel = LstGetSelection(list);
> >      if (sel != noListSelection)
> >      {
> >       SetupCoversList(pForm, sel);
> >       FrmDrawForm(pForm);
> >      }
> >     }
> >     break;
> >    }
> >    break;
> >   }
> >
> > Now the function "SetupCoversList" simply figures out how many
> > visible items
> > there are supposed to be in the listbox and sets the drawing function.
> > (Before anyone asks, I do not use the built-in category feature for this
> > list because there could be anywhere from 10 to 100 categories.) I have
> > tried using FrmUpdateForm and I have tried returning a true from the
event
> > handler (to tell the dialog I handled it) and nothing seems to work..
the
> > highlight still gets all messed up.
> >
> > ----------
> > Bradly J. Barton - [EMAIL PROTECTED]
> > Jenies Technologies Incorporated
> > (972) 602-1835
> > http://www.JTI.net
> > http://PalmInHand.com
> >
> >
> > --
> > 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/



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to